What is PostScript?
PostScript is a page description language developed by Adobe Systems, widely used in the printing and publishing industry for describing the appearance of a printed page in a device-independent manner. It defines how text, vector graphics, and raster images are rendered and positioned on a page.
Relation to PDFs:
PostScript also plays a significant role in the creation and processing of PDF (Portable Document Format) files. PDFs often contain elements described using the PostScript language, such as vector graphics and text. When a PDF file is printed or viewed, the PostScript instructions are interpreted to produce the final output.
Additionally, PostScript files can be directly converted to PDF format, as PDF is based on PostScript. Furthermore, PostScript files may contain scripts and programmable elements, which PDF files may or may not retain, depending on the conversion process. Understanding PostScript helps you understand its role in the context of PDFs.
PostScript and PDF
PostScript is a programming language. A PostScript file is a program that, when executed by an interpreter, draws a page and can contain loops, variables, and conditionals like any other program. PDF is based on PostScript but intentionally dropped its programming capabilities. A PDF describes the final result instead of the steps to create it, which is why any page can be opened directly without processing all previous pages.
Why the difference matters in practice
- Random access. A PDF reader can jump straight to page 400; a PostScript interpreter must process the file in sequence to reach that page.
- Predictability. The same PDF renders the same way everywhere, while a PostScript program can behave differently in different interpreters.
- Features. Interactivity, forms, annotations and encryption exist in PDF and have no equivalent in PostScript.
PostScript is still used in printing, where a RIP may still accept it as input, and the two formats are routinely converted between each other. Its drawing model, including the object syntax that PDF inherited, is the reason the two look so similar internally.