Graphics Programs Reference
In-Depth Information
PDF to PostScript and Back Again
The
pdf2ps
and
ps2pdf
command-line programs which ship with GhostScript can con-
vert between PDF and PostScript. Sometimes this involves quite complicated and slow
processing which may lead to larger file sizes or the loss of some constructs (for example,
text being converted to outlines). PDF and PostScript are, after all, very different—
despite a shared heritage.
ps2pdf
and
pdf2ps
are available from
the GhostScript home page
.
Rasterizing PDF to an Image
The
gs
program which comes with GhostScript can be used to render a PDF page to a
raster image at a given resolution, suitable for printing or for onscreen use. This is the
facility used by GSView to display PDF pages. This is achieved by specifying one of
several special output devices which correspond to image file formats, such as PNG
and TIFF.
gs
is part of the GhostScript system, available from
the GhostScript home page
.
Printing Files to PDF
Most modern word-processors have the facility to export as PDF, maintaining hyper-
links and building bookmarks for the table of contents. However, it is often necessary
to produce PDF output from programs which do not have the facility to convert their
native format to PDF. This can be achieved by the use of a printer driver which writes
the PDF to a file, instead of printing it.
Mac OS X provides this facility natively, through the “Save as PDF” option in the print
dialog.
On Unix platforms, this facility is provided by the open source
CUPS-PDF backend to
On Microsoft Windows, the open source
PDFCreator printer driver
achieves the same
job. It uses GhostScript internally.
PDF Editors
PDFs were not originally intended to be edited significantly, but as a scalable, structured
end-format for publishing. Thus, most editing software has restricted and specific
editing functions such as merging files, adding annotations, filling in forms, or making
small edits to page content.
In
Chapter 9
we looked at
pdftk
, an open source program for command-line manipu-
lation of PDF files. In this section, we list other ways of editing existing PDF files.