PostScript is a page description language. Actually it is more than that — in fact it is a specialpurpose programming language, but designed (by Adobe) for the job of describing how graphic elements and characters are laid out on a page. PostScript is a fully open and documented standard. A PostScript printer will accept a PostScript file and print it directly. If you have a different type of printer, the printing system will filter the PostScript appropriately before passing it to the printer, but PostScript is considered the lingua franca of printing in Linux. Applications that produce output for printing produce that output in the form of PostScript.
A PostScript file is a plain text file with a certain specific format. It always starts something like this:
Although raw PostScript looks odd at first glance, it is not difficult to learn how to write simple PostScript files to create pages with geometrical shapes and text on them, for example.
A PostScript file is typically called something such as file.ps. An encapsulated PostScript file may have the file extension .eps. To view it you can use any of the programs gv, ggv, evince, or kghostview. These all use ghostscript (gs) in the background to render the file in graphical form.
You can print a PostScript file directly from the command line with:
[email protected]:~/tmp> lpr file.ps
Because of PostScript's importance as a format, there are a number of utilities for processing PostScript files in various ways:
■ ps2ascii tries to extract text from a PostScript file.
■ ps2pdf converts a PostScript file to PDF.
■ The psutils package includes various utilities for splitting and joining PostScript files and for rearranging and resizing pages.
Any application that enables you to print to file will produce PostScript. Some applications also offer a print to PDF option.
| f - - p An encapsulated PostScript file (.eps) is a special type of PostScript file that includes ' - ~ ■"■> ■ information about its physical size (bounding box) and that is designed to be included inside another document.
Was this article helpful?