[XeTeX] Including encapsulated Postscript files using xelatex

Peter Dyballa Peter_Dyballa at Web.DE
Sat Dec 20 11:46:03 CET 2008


Am 16.12.2008 um 03:53 schrieb VAFA KHALIGHI:

> \documentclass{article}
> \usepackage{graphicx}
> \begin{document}
> \includegraphics{flower.eps}
> \end{document}


Indeed! Xdvipdfmx invokes Ghostscript to convert the EPS image to PDF  
that then could easily be included in the final PDF output file.

The way the conversion works has one problem: scaling does not  
happen, the canvas on which the image is projected is restricted to  
DIN A0 size – which is quite large.

Xelatex seems to have problems with some EPS files. One of my test  
files seems to be put outside the document. The XDV file contains:

	PSfile="flower.eps" llx=55 lly=68 urx=0 ury=0 rwi=-550

For a working case xelatex records:

	PSfile="flower.eps" llx=0 lly=0 urx=120 ury=80 rwi=1200

(flower.ps is just a sym-link to this or that EPS file) Invoking gs,  
as copied from xdvipdfmx -vvv, on the command line I see a PDF file  
created with DIN A0 size. No error happens. Inside the PDF file the  
small EPS image is put near the lower left corner ... When I \vspace* 
{20cm} the image (move the lower left edge of the DIN A0 graphics  
down by 20 cm) it becomes visible *somewhere* on the page. The size  
of the image seems to be conserved.


IMO it's not recommended to do it in this simplistic way. Though it  
works.

--
Greetings

   Pete

We also sponsor National Invisible Chronic Illness Awareness Week  
annually in September.
Join the millions




More information about the XeTeX mailing list