[XeTeX] Trimming an included pdf file

Nikola Lecic nlecic at EUnet.yu
Sat Jan 27 17:51:38 CET 2007

Malcolm Ross a écrit :
> Is there a simpler way to deal with this than cropping the graphics  
> manually in a graphics application like GraphicConverter? (I'm  
> working on a Mac).
If you can save your graphics as EPS files, I think that the simplest 
way is to use Thomas Esser's epstopdf.pl (it works on any platform). 
That script produces cropped PDFs and you need just a simple 
\includegraphics command in your XeLaTeX document. Here is a quotation 
from Esser's script that probably targets your problem:

#   b) it sets a page size exactly corresponding to the BoundingBox
# This means that when Ghostscript renders it, the result needs no
# cropping, and the PDF MediaBox is correct.
#   c) the result is piped to Ghostscript and a PDF version written
# It needs a Level 2 PS interpreter.
# If the bounding box is not right, of course, you have problems...
# The only thing I have not allowed for is the case of
# "%%BoundingBox: (atend)", which is more complicated.

Nikola Lečić

More information about the XeTeX mailing list