Shrinking a PDF from the command line: Difference between revisions

From Scribus Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
This is a simplified version of the method use in [[Web optimised PDF]].
This is a simplified version of the method used in [[Web optimised PDF]].
 
That article shows a Perl script, a rather long one at that, to accomplish the task. The actual shrinkage is accomplished by the use of <tt>pdf2ps</tt> and <tt>ps2pdf</tt>, which are utilities which come with ghostscript.
 
My reading of the man page for '''pdf2ps''' and a [http://pages.cs.wisc.edu/~ghost/doc/cvs/Ps2pdf.htm web reference] for '''ps2pdf''' suggest that the first step, converting to a PostScript file, does not involve any compression. It is only in the conversion back to PDF that various settings allow for shrinking the size of the resulting file.

Revision as of 21:50, 12 January 2009

This is a simplified version of the method used in Web optimised PDF.

That article shows a Perl script, a rather long one at that, to accomplish the task. The actual shrinkage is accomplished by the use of pdf2ps and ps2pdf, which are utilities which come with ghostscript.

My reading of the man page for pdf2ps and a web reference for ps2pdf suggest that the first step, converting to a PostScript file, does not involve any compression. It is only in the conversion back to PDF that various settings allow for shrinking the size of the resulting file.