# [XeTeX] pdf page size & xdvipdfmx (again)

Jonathan Kew jonathan_kew at sil.org
Sun Sep 3 10:29:06 CEST 2006

Hi Josh,

I'm just wading through email after a week away, so may have missed a
lot of background to this (sorry).

On 3 Sep 2006, at 2:03 am, Joshua Grauman wrote:

> I upgraded to xdvipdfmx-0.3 to no avail...
>
> Josh
>
>> I'm still trying to change the actual size of the pdf page. After
>> trying
>> the options people gave me, I'm back again. BTW, thank you those
>> who have
>> sent answers. For clarification, I'm not trying to add marks to
>> the page
>> to tell a trimmer where to trim a page (forgive my ignorance on such
>> matters/terms), but change the actual size of the pdf. I thought
>> I'd try
>> to go to the lowest level to start diagnosing the problem, so I
>> tried:
>>
>> xdvipdfmx -p "6in,9in" test.xdv (I tried both with and without the
>> "s)
>>
>> and it still didn't create a correctly sized pdf. So, I'm assuming
>> something is broken with xdvipdfmx. I'm running xdvipdfmx-0.1
>> under Linux.
>> Any thoughts? Thanks.

This works for me; e.g.,

xdvipdfmx -p "6in,9in" test.xdv

creates a PDF that is 6in wide and 9in high; and for comparison,

xdvipdfmx -p "9in,6in" test.xdv

puts the same content into one that's 9in wide and 6in high.

So then the question is why it doesn't work the same for you. Two
possibilities come to mind:

(1) A long shot, but just in case: how are you determining the media
size of the resulting PDF? Is it possible that whatever viewer you're
using ignores the dimensions from the file and displays what it

(2) If there is a papersize \special in your .xdv file (as a result
of an explicit \special in your source, or from a LaTeX class/package
that's attempting to set the size) then this will override the -p
option, so nothing you do on the command line will have any effect.
To test this, you could:

(2.a) try a simple .xdv file created with plain xetex (e.g., "xetex -
no-pdf story.tex \\end" and then xdvipdfmx with various -p options); or

(2.b) examine your .xdv file (e.g. with "hexdump -C") and look for
"papersize" in there, fairly near the beginning. If it's there, you
need to convince the package that generates it to use the dimensions
you want.

HTH,

JK