[XeTeX] xelatex pdf files much larger than latex dvipdfm pdf files

Bruno Voisin bvoisin at mac.com
Thu Apr 24 16:13:38 CEST 2008


Le 24 avr. 08 à 15:44, Daniel Greenhoe a écrit :

> When I compile a book of mine using xelatex, the resulting pdf file  
> is about 1.8 times as large as when I compile using latex together  
> with dvipdfm. The xelatex pdf is ~3.7Mbytes and the latex-dvipdfm  
> pdf is ~2Mbytes. Why would this be?

If you're on the Mac, by default xelatex uses the XDVI-to-PDF  
converter xdv2pdf which relies on the OS X Quartz "libraries" (if that  
is indeed the correct term) to produce PDF output. As a result, the  
output is in the PDF 1.3 format and does not use compression.

If you make xelatex use xdvipdfmx instead of xdv2pdf, the PDF  
production will rely on xdvipdfmx only. Output will be in PDF 1.4  
format and use compression.

> The tex test file I tried was similar to this (with the dolit10.txt  
> somewhat modified for compatibility with tex):
>
> \documentclass{book}
> \begin{document}
> \input{dolit10.txt}
> \input{dolit10.txt}
> \input{dolit10.txt}
> \input{dolit10.txt}
> \input{dolit10.txt}
> \input{dolit10.txt}
> \input{dolit10.txt}
> \input{dolit10.txt}
> \input{dolit10.txt}
> \input{dolit10.txt}
> \end{document}
>
> However, in this case, the xelatex pdf was actually a little smaller  
> than the latex-dvipdfm pdf file, with both being about 1.4Mbytes.

With this test, I get (on Mac OS X 10.5.2) 7.7 MB output with xelatex  
+ xdv2pdf:

$ pdfinfo test.pdf
Title:           XeTeX output 2008.04.24:1609
Creator:        xdv2pdf
Producer:       Mac OS X 10.5.2 Quartz PDFContext
CreationDate:   Thu Apr 24 14:09:48 2008
ModDate:        Thu Apr 24 14:09:48 2008
Tagged:         no
Pages:          510
Encrypted:      no
Page size:      595 x 842 pts (A4)
File size:      8038865 bytes
Optimized:      no
PDF version:    1.3

and 1.5 MB output with xelatex + xdvipdfmx:

$ pdfinfo test.pdf
Creator:         XeTeX output 2008.04.24:1601
Producer:       xdvipdfmx (0.6)
CreationDate:   Thu Apr 24 16:01:44 2008
Tagged:         no
Pages:          510
Encrypted:      no
Page size:      595.27 x 841.82 pts (A4)
File size:      1589001 bytes
Optimized:      no
PDF version:    1.4

Bruno Voisin


More information about the XeTeX mailing list