PostScript in a Nutshell

PostScript is a page description language. A PostScript file is simply a text file that contains the PostScript code to draw one or more page. This file is sent to a PostScript interpreter, which executes the program and draws the pages. In most applications, the PostScript interpreter is embedded in the output device; a laser printer, for example, has a built-in PostScript interpreter that renders the final pages.

For PostScript development work there is also the Ghostscript package, available for most operating systems, which consists of a number of PostScript rendering tools, including an interpreter and a PostScript viewer. Ghostscript is used by many of the software packages in this book (such as the Gimp and ImageMagick) for parsing and generating PostScript, EPS, and PDF files. It also comes as a standard part of most Linux distributions (see the sidebar Getting Ghostscript).

Get Perl Graphics Programming now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.