[XeTeX] xdvipdfmx doesn't seem to respect PDF crop areas

Zachary Pincus zpincus at stanford.edu
Fri Sep 22 10:55:41 CEST 2006


>>> Unfortunately, when I use xelatex with the xdvipdfmx driver, the
>>> crop
>>> area is not respected for the PDF figures included with
>>> \includegraphics or with \XeTeXpdffile. If I use "regular"
>>> xelatex or
>>> plain latex, things work fine.
>>
>> What happens if you use dvipdfm.def instead of xetex.def
>> by writing as
>> \usepackage[dvipdfm]{graphicx}
>> \usepackage[dvipdfm, ...]{hyperref}
>> and creating .bb file for each pdf by
>> ebb -c foo.pdf
>> before compiling by xelatex.
>
> Thanks for the suggestion.
>
> I'll let you know how this goes as soon as I get a new ebb compiled.
> (There are some dependencies that I don't have... No kpathsea library
> from the i-installer (OS X tex package) version of tex,

Well, this was quite a bit of fun.

For posterity, in case anyone ever needs to do this again: the i- 
installer version only has the kpathsea headers and libs if you  
install the 'full' TeX, not the 'basic' one. Next, the kpathsea  
headers seem vaguely broken in that if the preprocessor symbol  
'HAVE_PROTOTYPES' is not externally defined, then gcc chokes on them.  
(This was tricky to find since the gcc barf was hidden by the  
configure script for dvipdfm.) So finally by setting CFLAGS to '- 
DHAVE_PROTOTYPES', I got ebb to compile. At which time I found that  
ebb only works for PDF versions 1.3 and below.

After converting a test figure to 1.3 from 1.4 and creating a  
bounding box file and re-running xelatex+xdvipdfmx... nothing  
changed. The bounding box is ignored.

I'm including the figure with '\includegraphics{figure}', and the  
files 'figure.pdf' and 'figure.bb' are next to eachother in the  
filesystem. graphicx and hyperref are both configured to use dvipdfm.  
The xelatex output doesn't hint at anything amiss.

So maybe xdvipdfmx is disregarding the bounding box info from .bb  
files too? Let me know if I can test anything further, and thanks  
Akira and Jonathan for the help and suggestions!

Zach



>
> It's probably in /usr/local/teTeX/lib; I haven't looked at the ebb
> sources, but you may be able to give a configure option to locate it,
> something like --with-kpathsea=/usr/local/teTeX. If there isn't a
> suitable configure option, then setting -I and -L options in CFLAGS
> and LDFLAGS may also be a workaround.
>
>> Even if this approach works, am I correct in assuming that this
>> constitutes a bug somewhere, or an impedance mismatch between XeTeX
>> and xdvipdfmx? ("Normal" XeTeX supports all of the different kinds of
>> PDF areas like crop, media, bleed, etc. directly via the
>> \XeTeXpdffile command.) I guess my question is: do you think this is
>> a temporary workaround, or something that I need to get used to doing
>> in order to run XeTeX with xdvipdfmx?
>
> Temporary workaround; xdvipdfmx should handle the pdf boxes directly,
> in the same way as xetex/xdv2pdf. I'll look into it.
>
> JK
>
>
>
> _______________________________________________
> XeTeX mailing list
> postmaster at tug.org
> http://tug.org/mailman/listinfo/xetex



More information about the XeTeX mailing list