





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.
- Document is created in an application
program.
- Document is printed from the application
using the PostScript driver which creates PostScript code.
- The interpreter associated with the
output device executes the code and translates pages into appropriate
raster images.
- 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
- Prolog - where procedures that will
be executed are identified. Includes header and comments.
- 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:
- Constructing paths
- Controlling type
- Controlling images
- Drawing lines and objects
- Controlling color output
- Controlling page output.
- Defining graphics state (current color
and line width)
- Transformations (scaling and rotating).
Definitions of graphic objects
are stored in resource files. The resource is then called by name in the page
description. Examples of resources are
- Screening parameters (halftone dictionaries)
- Character-drawing procedures (font
dictionaries)
- CLUT (color rendering dictionaries)
- Input device profiles (color-space
arrays)
- Output device profiles (page device
dictionaries)
If the named resource is
not available to the interpreter, then errors occur. (The most common error
involves fonts).
- Resources may be stored in memory
or disk.
- PostScript imaging model is analogous
to opaque paint.
- “Paint” may be applied as a line,
fill or bitmap.
- 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.