[XeTeX] First experiences with xetex and some bugs
Steffen Prohaska
prohaska at zib.de
Mon Jul 5 14:32:28 CEST 2004
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi,
On Jul 5, 2004, at 9:39 AM, Jonathan Kew wrote:
>>>> ---+ Bug: Including pdf images
>>>> ---++ Quick Summary
>>>>
>>>> Including certain pdf images breaks font rendering starting with
>>>> the next page.
>>>> See the attached test document and the output files created using
>>>> pdflatex and
>>>> xelatex.
>>>>
>>>
>>> This problem seems to occur when using a PDF that was created by
>>> Quartz, but not with other PDFs such as from Distiller. Any PDF
>>> experts here who can inspect the test.pdf file and tell us if it is
>>> somehow invalid? It sounds like there may be a problem with Quartz
>>> PDF generation; if we can pin down exactly what's wrong, I'll file a
>>> bug report with Apple.
>>
>> I think you're right. All the pdf documents I encountered problems
>> with were created by Apple's Preview. I copied stuff to the clipboard
>> and used 'File - New From Clipboard', to get a pdf document, which I
>> saved to disk. I didn't have problems with other pdfs which were
>> created using, e.g. xfig. But nonetheless there should be a way to
>> deal with theses documents. At least pdftex is able to do so.
>
> Yes, I see that pdfTeX handles them OK. I'm thinking the problem is
> with the PDF generation through the Quartz graphics, when a page from
> another PDF document is drawn into the context. I don't see anything
> further that I can do to try and solve this within my code, as I'm
> already wrapping the rendering of the embedded PDF with calls to
> CGContextSaveGState...CGContextRestoreGState. The fact that the
> particular PDF document drawn then disrupts font rendering on the next
> page looks like an Apple (Quartz) bug to me.
You can fix the pdf files which break xetex by running them through gs:
gs -q -sDEVICE=pdfwrite -sOutputFile=good.pdf -dNOPAUSE -dBATCH bad.pdf
Whatever ghostscript does to the files, it fixes the problems :) You
might also want to add some options, e.g. JPEG compression of the
images, see http://www.cs.wisc.edu/%7Eghost/doc/cvs/Ps2pdf.htm. At
least for preview generation.
Currently I'm using:
gs -q -sDEVICE=pdfwrite -sOutputFile=good.pdf -dNOPAUSE -dBATCH
- -dPDFSETTINGS=/screen -dAutoFilterColorImages=false bad.pdf
Cheers,
Steffen
- --
PGP Public Key: http://www.zib.de/prohaska/prohaska.pgp
Key id: 0xDA749299
Key fingerprint: 8B59 83A8 A43D E0E2 DEDB D479 3157 2FEA DA74 9299
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (Darwin)
iD8DBQFA6UpgMVcv6tp0kpkRAjqvAJ9NrDQmm0PnpnpCS4q/aSbDIVlmCwCdERt5
7yl5jm5yd6OQ6QiQxLS0qlw=
=Dmv+
-----END PGP SIGNATURE-----
More information about the XeTeX
mailing list