[OS X TeX] compress file

Maarten Sneep maarten.sneep at xs4all.nl
Mon Jan 31 16:32:03 CET 2005


On 31 jan 2005, at 16:17, Guido Mocken wrote:

> I have a similar "problem": My PDF-document is almost 70 MB. I can zip 
> this down to about one tenth (7MB), but I would prefer to keep it 
> ".pdf", not ".pdf.zip" or ".pdf.bz2".

Further information requested: any indication of the number and types 
of images, number of pages, how the images are currently generated, 
fonts used in the figures, etc.

Suggestions: download pdftk, and use it to compress the individual 
images that are in pdf format, or let is loose on the final file.

Truly offbeat suggestion: use pstoedit (i-Package available, 
http://www.nat.vu.nl/~sneep/i-packages/pstoedit.ii2 ), convert the 
files to Metapost source, run mpost on the resulting figure and include 
those. Since the font inclusion is now done by pdftex itself, it can 
create more efficient subsets, resulting in smaller files.

> I noticed some interesting facts:
>
> - AdobeAcrobat can bring down the size to roughly the same 7 MB just 
> by dropping support for AdobeReader versions before 5.0.
>
> - Using epstopdf instead of TeXShop/PantherDistiller can sometimes 
> dramatically reduce the intermediate PDF versions of my included EPS 
> graphics. Doing so for all files would probably also reduce the size 
> of the combined document.

the panther distiller is meant for quality, not for small file sizes, 
so this is hardly a surprise.

> - \pdfcompresslevel=9 has no effect on the document size.

No, AFAIK it is the default, try setting it to 0 (no compression) and 
watch the file size blow up.

> The first result is what I want, but I have no Acrobat at home, 
> therefore I'd like to know whether the same effect can be achieved 
> directly with pdftex. Because of the same compression ratio, I believe 
> there is some sort of internal zip-compression taking place. Can this 
> be done in pdftex?

Acrobat files are compressed with zip internally, reducing the file 
size beyond that means removing information, although that may not mean 
reducing the quality. Recompressing can also mean that the contents of 
the pdf file is combined in a more efficient manner, so that could 
help.

> epstopdf, which AFAIK relies on GS, does not always give the same 
> result (e.g. in terms of font substitutions) as the Panther Distiller, 
> so batch-converting all my EPS-files again is no good solution (I 
> would have to manually check every single output file) in this case. 
> Is there some sort of pdf2pdf tool, that can give me the (lossless) 
> compression without any other changes?

pdftk: http://www.accesspdf.com/index.php?topic=pdftk

Maarten

--------------------- Info ---------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
           & FAQ: http://latex.yauh.de/faq/
TeX FAQ: http://www.tex.ac.uk/faq
List Post: <mailto:MacOSX-TeX at email.esm.psu.edu>





More information about the macostex-archives mailing list