Next: , Previous: PS line options, Up: PostScript driver class



B.6.6 The PostScript prologue

Most PostScript files that are generated mechanically by programs consist of two parts: a prologue and a body. The prologue is generally a collection of boilerplate. Only the body differs greatly between two outputs from the same program.

This is also the strategy used in the PSPP PostScript driver. In general, the prologue supplied with PSPP will be more than sufficient. In this case, you will not need to read the rest of this section. However, hackers might want to know more. Read on, if you fall into this category.

The prologue is dumped into the output stream essentially unmodified. However, two actions are performed on its lines. First, certain lines may be omitted as specified in the prologue file itself. Second, variables are substituted.

The following lines are omitted:

  1. All lines that contain three bangs in a row (!!!).
  2. Lines that contain !eps, if the PostScript driver is producing ordinary PostScript output. Otherwise an EPS file is being produced, and the line is included in the output, although everything following !eps is deleted.
  3. Lines that contain !ps, if the PostScript driver is producing EPS output. Otherwise, ordinary PostScript is being produced, and the line is included in the output, although everything following !ps is deleted.

The following are the variables that are substituted. Only the variables listed are substituted; environment variables are not. See Environment substitutions.

bounding-box
The page bounding box, in points, as four space-separated numbers. For U.S. letter size paper, this is 0 0 612 792.
creator
PSPP version as a string: GNU PSPP 0.1b, for example.
date
Date the file was created. Example: Tue May 21 13:46:22 1991.
data
Value of the data PostScript driver option, as one of the strings Clean7Bit, Clean8Bit, or Binary.
orientation
Page orientation, as one of the strings Portrait or Landscape.
user
Under multiuser OSes, the user's login name, taken either from the environment variable LOGNAME or, if that fails, the result of the C library function getlogin(). Defaults to nobody.
host
System hostname as reported by gethostname(). Defaults to nowhere.
prop-font
Name of the default proportional font, prefixed by the word font and a space. Example: font Times-Roman.
fixed-font
Name of the default fixed-pitch font, prefixed by the word font and a space.
scale-factor
The page scaling factor as a floating-point number. Example: 1.0. Note that this is also passed as an argument to the BP macro.
paper-length
paper-width
The paper length and paper width, respectively, in thousandths of a point. Note that these are also passed as arguments to the BP macro.
left-margin
top-margin
The left margin and top margin, respectively, in thousandths of a point. Note that these are also passed as arguments to the BP macro.
title
Document title as a string. This is not the title specified in the PSPP syntax file. A typical title is the word PSPP followed by the syntax file name in parentheses. Example: PSPP (<stdin>).
source-file
PSPP syntax file name. Example: mary96/first.stat.

Any other questions about the PostScript prologue can best be answered by examining the default prologue or the PSPP source.