PDF’s, Linux and the Web

By Blane Warrene
We teamed up with SiteGround
To bring you the latest from the web and tried-and-true hosting, recommended for designers and developers. SitePoint Readers Get Up To 65% OFF Now

Regardless if the use of pdf’s is considered useful for your site visitors or cumbersome, they are a part of the everyday web. Often this is the most functional method for distributing complex documents to any platform.

If your Linux workstation or server includes Ghostscript, you have some excellent open-source alternatives for creating and optimizing PDF files.

Ghostscript is an interpreter for PostScript and Portable Document Format (PDF) files as well as complex image files. It can translate and output files to a viewer (Ghostview for one, as well as Acrobat Reader) on numerous Unix variants including of course Linux, as well as translate PostScript files to print to a non-postscript printer.

Within the Ghostscript application there are two utilities, ps2pdf and pdfopt. ps2pdf enables you to generate pdf files completely compatible with Acrobat Reader, including the ability to tweak Adobe Distiller parameters (dozens) and to set resolution for output, such as for screen viewing, for printing and even for pre-press.

Also available is a nice little utility called pdfopt, which allows for the optimization of pdf files, often shrinking file size as much as 50 percent or more.

For information on these tools, see the links below:

Ghostscript –> Complete Overview

ps2pdf –> Create PDF files without Acrobat/Distiller

pdfopt –> PDF Optimizer

We teamed up with SiteGround
To bring you the latest from the web and tried-and-true hosting, recommended for designers and developers. SitePoint Readers Get Up To 65% OFF Now
  • Thanks for the tip off. Have a use of pdfopt immediately.

    One more for the road: pdfmerge http://microtronyx.com/pdfmerge/ – simple Perl script which uses ghostscript behind the scenes, providing a command line tool for merging multiple pdf files.

  • I think this Mozilla wishlist item sounds very interesting if somebody would implement it: http://bugzilla.mozilla.org/show_bug.cgi?id=100571

  • Great lead on pdfmerge – needed that one a few times. Definitely adding it to my arsenal. Thanks…