[XeTeX] page size of pdf file

Ross Moore ross at ics.mq.edu.au
Sun Oct 18 21:00:07 CEST 2009


Hi Andreas,

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:

plain: 597.51227pt, 845.04712pt
<use  "ruby.pdf" >
latex: 597.51227pt, 845.04712pt


plain: 597.5022pt, 844.9768pt
<use  "primeprime.pdf" >
latex: 597.5022pt, 844.9768pt

And I get essentially the same (roughly 1 in 10 million)
sizes using pdfTeX as the engine.

   <ruby.pdf, id=1, 597.51233pt x 845.0471pt> <use ruby.pdf>
   <primeprime.pdf, id=1, 597.50229pt x 844.97684pt> <use  
primeprime.pdf>

Can you supply the  dummy.pdf  that you used?

>
> Is there a fix for xetex.def, yet? I couldn't find a newer
> one than:
>
>    xetex.def    2006/08/10 v0.92

Fixing what?
This is the same version that I'm using.
What exactly are you claiming is wrong, and where is
the evidence to support that view?


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?


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.


> Ciao
> Andreas


Hope this helps,

	Ross

------------------------------------------------------------------------
Ross Moore                                       ross at maths.mq.edu.au
Mathematics Department                           office: E7A-419
Macquarie University                             tel: +61 (0)2 9850 8955
Sydney, Australia  2109                          fax: +61 (0)2 9850 8114
------------------------------------------------------------------------





More information about the XeTeX mailing list