[pdftex] Incredibly PDF filesize difference by pdflatex compared to ps2pdf

The Thanh Han hanthethanh at myrealbox.com
Wed Jun 16 08:46:06 CEST 2004


On Tue, Jun 15, 2004 at 02:00:40AM -0700, Roboco Sanchez wrote:
> Hello,
> 
> Anyone can tell me if this is a bug? I have 2 pdf
> files created differently on my latest MiKTeX and the
> output file sizes are incredibly different.
> 
> 1. pdflatex -> 1.3MB
> 2. latex+dvips+ps2pdf -> 378KB
> 
> I've tried \pdfcompresslevel9 but it doesn't help.
> These are the files:
> 
> http://dump.nasabox.net/dump/testotf-pdflatex.pdf
> http://dump.nasabox.net/dump/testotf-pdflatex.log
> http://dump.nasabox.net/dump/testotf-latex.pdf
> http://dump.nasabox.net/dump/testotf-latex.log
> 
> >From the log files:
> pdflatex: 1011303 words of font info for 152 fonts
> latex: 650836 words of font info for 86 fonts
> 
> Any idea would be appreciated.

there are two reasons why the pdftex output is much bigger:

1) the test file makes heavy use of Extent font to simulate
the sc variant; pdftex creates a new instance for every Extend or Slant
font, while dvips implements those tricks by changing the text matrix. 

In the beginning pdftex also implemented Extend and Slant fonts using
the text matrix like dvips. Then I dropped this method, as when it
comes to font expansion things are too complicated to manage. The
disadvantage is of course the duplicate of font files (they differ only
in the FontMatrix field) and hence bigger output size. On the other
hand, it makes things simpler to maintain.

2) gs supports Type1C format, which allows better compression. pdftex
doesn't support this format (yet); this is not something that can be
easily done.

This is not a bug, but a known limitation of pdftex.

Thanh



More information about the pdftex mailing list