firstpreviousnextlastinfohome

PostScript Fundamentals

Device Independence maintained by maintaining a distinction between user space (where documents are created) and device space (where they are output). Processing a document using PostScript has 4 different phases.

  1. Document is created in an application program.
  2. Document is printed from the application using the PostScript driver which creates PostScript code.
  3. The interpreter associated with the output device executes the code and translates pages into appropriate raster images.
  4. The raster image is sent to the marking engine of the device.

The first 2 phases in the user space and the second 2 in the device space.

Most PostScript code generated by printer drivers conforms to Adobe’s Document Structuring Conventions.

Conforming programs have two parts

  1. Prolog - where procedures that will be executed are identified. Includes header and comments.
  2. Script - document setup followed by individual page descriptions and a trailer announcing the end of the document. A showpage command signals the output of each page.

PostScript instructions are known a operators. They work with procedures and operands.

There are over 200 operators in PostScript. Typical tasks are:

Definitions of graphic objects are stored in resource files. The resource is then called by name in the page description. Examples of resources are

If the named resource is not available to the interpreter, then errors occur. (The most common error involves fonts).

  1. Resources may be stored in memory or disk.
  2. PostScript imaging model is analogous to opaque paint.
  3. “Paint” may be applied as a line, fill or bitmap.
  4. Every instruction to paint paints over what was last painted. Thus, it is important to paint foreground and background objects in the correct sequence.

Additive painting of one color over another is handled by setting one object to overprint another or using a mask operator. A mask works like a stencil.