[XeTeX] page size of pdf file
Andreas Matthias
andreas.matthias at gmail.com
Sun Oct 18 22:01:37 CEST 2009
Ross Moore wrote:
> On 19/10/2009, at 3:04 AM, Andreas Matthias wrote:
>
>> The following example calculates the size of a pdf twice.
>> Once by using XeTeX primitives and once by using LaTeX's
>> graphics driver. Unfortunately, the size isn't the same.
>>
>>
>> \documentclass{article}
>> \usepackage{graphicx}
>>
>> \begin{document}
>> \makeatletter
>>
>> \setbox\z@=\hbox{\XeTeXpdffile "dummy.pdf"\relax}
>> \typeout{plain: \the\wd\z@, \the\ht\z@}
>>
>>
>> \setbox\z@=\hbox{\includegraphics{dummy.pdf}}
>> \typeout{latex: \the\wd\z@, \the\ht\z@}
>>
>> \end{document}
>>
>>
>>
>> Which yields the following:
>>
>> plain: 597.5083pt, 845.04706pt
>> <use "dummy.pdf" >
>> latex: 599.74895pt, 848.21597pt
>>
>
> I've tried this with a couple of 1-page PDFs produced
> using XeTeX, and find no such discrepancy in the sizes:
I get this discrepancy with every PDF I have tried.
> Can you supply the dummy.pdf that you used?
CTAN:/macros/latex/contrib/pdfpages/dummy.pdf
> Maybe my XeTeX version isn't the most recent; viz.
>
> This is XeTeXk, Version 3.1415926-2.2-0.999.7 (Web2C 7.5.6)
>
> What are you using?
This is XeTeXk, Version 3.1415926-2.2-0.999.6 (Web2C 7.5.7)
> What exactly are you claiming is wrong
The size that I get by using \XeTeXpdffile directly is the
one that matches with the MediaBox of the PDF. The size I get
by using \includegraphics is too big. That's why I thought
I could be a problem with xetex.def.
> The LaTeX "graphics driver" is just an interface to the
> XeTeX primitive, so both *should* give the same result
> --- unless somehow an extra space character is getting
> inserted somewhere. If this is so, then it's not happening
> in my version of xetex.def . Send me what you have, so that
> I can do a diff to check whether somehow it has become
> different after packaging and unpacking again.
I just downloaded xetex.def from CTAN again, but I still
get different sizes.
CTAN:macros/latex/contrib/xetex-def/xetex.def
Can anyone reproduce the size discrepancies that I get?
Ciao
Andreas
More information about the XeTeX
mailing list