ps2pdf making very large pdf files
dld at coyote.com.au
Wed Sep 18 09:40:48 EST 2002
On Tue, Sep 17, 2002 at 11:21:20AM +1000, John Griffiths wrote:
> is there a good alternative to ps2pdf?
> in windows acro distiller performs an equivalent task (but is not so easily
> customised to suit our purposes, plus i'm trying to move away from windows
> the acro distiller output is of similar quality to look at but varies from
> 75% to 10% of the file sizes for equivalent jobs..
As has been mentioned, distiller and ps2pdf do different things. ps2pdf
makes the minimal changes to a postscript file to turn it into a pdf (ps and
pdf are _almost_ the same language). Distiller on the other hand is fairly
free with the original document, especially wrt embedded images. pdf
supports jpg and png compression for instance. Most ps files have
uncompressed (or very light rle-like compression), and are huge but easy to
parse by the dumb little CPUs typically found in printers. PDF's are often
more work to uncompress, but are displayed on larger systems, and transfered
over lower-bandwidth channels.
To get similar behavior with ps2pdf, you might extract the embedded
images, and then reembed them with jpg compression, and just suffer the
artifacts (or png if you want no artifacts, but do want some compression).
A tool exists to extract images from pdf files: pdfimages, part of
xpdf-utils. How you them reembed them with new encoding... a job for Panda?
It's best to generate PDF natively, rather than convert from PS. Native
tools (like pdflatex) generate better PDF files than using ps2pdf/Distiller
to PDF a native postscript file. If you can find a native PDF driver,
upgrade to a newer version that has PDF output, or hire someone to write a
PDF driver, that's the best solution. For the $5000 that Acrobat Distiller
Server apparently costs, you have quite a few other options. For the ($80?)
that the personal/bulk-licensed versions cost you may not have as many
pdflatex with hyperref generates heavily cross linked PDF documents with
embedded jpegs/pngs if that's what the original document had. For instance,
a 300M postscript thesis weighs in at 12M in PDF, at the full resolution of
the original material and with full internal hyperlinking of figures,
tables, section references, TOC, ... dvipdf is another alternative that
should be a bit more true to the postscript output (pdflatex is a different
layout engine). ps2pdf/Distiller are both hacks with different priorities
(ps2pdf stays true, while Distiller makes good-but-untrue PDFs).
More information about the linux