[XeTeX] XeTeX incorrectly scales JPEG and other graphics files

Herbert Schulz herbs at wideopenwest.com
Sat Sep 13 02:01:09 CEST 2008


On Sep 12, 2008, at 5:50 PM, Peter Dyballa wrote:

> Hello!
>
> When inserting a JPEG image (can also be PDF or PNG) XeTeX uses the  
> extractbb programme to create a file <graphics file name>.xbb and to  
> write the image's bounding box into that auxiliary file. LaTeX  
> (pdfeTeX) uses for the same purpose the programme ebb which puts  
> that data into a file <graphics file name>.bb. Both programmes  
> extractbb and ebb are sym-links to dvipdfmx. But the contents of the  
> two files is different:
>
> 	diff playloud.xbb playloud.bb
> 	3,4c3,4
> 	< %%BoundingBox: 0 0 85 40
> 	< %%CreationDate: Sat Sep 13 00:18:46 2008
> 	---
> 	> %%BoundingBox: 0 0 297 140
> 	> %%CreationDate: Sat Sep 13 00:17:44 2008
>
> XeTeX, when using xdvipdfmx or xdv2pdf as output driver, produces  
> obviously a (by a factor of at least 3) too small image (it should  
> have the same height as the shorter text):
>
> 	\documentclass{article}
> 	\usepackage{ifpdf,ifxetex,graphicx}
> 	\ifxetex
> 	    \usepackage[no-math]{fontspec}
> 	%    \usepackage{xltxtra,xunicode}
> 	%    \defaultfontfeatures{Mapping=tex-text}
> 	    \setmainfont{Times-Roman}
> 	\else
> 	  \usepackage[utf8]{inputenc}
> 	  \ifpdf
> 	    \usepackage{cmap}
> 	    \usepackage{times}
> 	  \else
> 	    \usepackage{times}
> 	  \fi
> 	  \usepackage[T1]{fontenc}
> 	  \usepackage[full]{textcomp}
> 	\fi
> 	\listfiles
> 	\pagestyle{empty}
> 	
> 	\begin{document}
> 	
> 	  \noindent\fontsize{15.625mm}{15pt}\selectfont monks\\
> 	  \fontsize{4mm}{15pt}\selectfont the transatlantic feedback
> 	
> 	  \includegraphics[height=16mm]{playloud.jpg}
> 	
> 	\end{document}
>
> The size of the JPEG is correct when I load graphicx separately with  
> the dvipdfmx option. I am using a pre-release TeX Live 2008 from  
> four weeks ago (2008-08-14).
>
> --
> Greetings
>
>  Pete


Howdy,

If I use

	\documentclass{article}
	\usepackage{graphicx}
	\listfiles
	\pagestyle{empty}
	
	\begin{document}
	
	  \noindent\fontsize{15.625mm}{15pt}\selectfont monks\\
	  \fontsize{4mm}{15pt}\selectfont the transatlantic feedback
	
	  \includegraphics[height=16mm]{playloud.jpg}
	
	\end{document}

compiling with pdflatex and xelatex (using xdvipdfmx) seem to give  
exactly the same result.

Good Luck,

Herb Schulz
(herbs at wideopenwest.com)




More information about the XeTeX mailing list