CPDS
CPDS is short for Composed Page Data Stream . This datastream consists of the following entities:
- The print data set (file), which contains data to be printed and which is created by an application program (mostly a formatter).
- Resource objects, which are collections of printing instructions and data to be printed. They are stored on libraries and referenced in the print data set. An example is a page segment, which can be a combination of image and text. Resources are built by specialized utility programs like Print Management Facility or PPFA [14].
- Composed-text data stream (we will concentrate on this only).
- Line format data stream. This is very convenient to enhance existing line printer applications.
- Mixed format data stream.
At the most basic level, CPDS is used to direct the placement of text on a page. This text with imbedded placement information is called composed text. CPDS as a "language" belongs to the family of IBM "architectures" which are based on "structured fields". These are definitions for functions and services. They all are of the form length, contents. Hence the contents may use all bit combinations of a byte. These definitions may be nested. Since the length declaration for the outermost "envelope" can only be determined after closing all the nesting, a pretty large storage will be necessary. This may be circumvented by limiting the lengths of some elements. That is e.g. done by the VM3812 product [5].
CPDS is clearly a nonprocedural static description of the contents of a printed page. Compared with the other PDL's presented here CPDS' merely aims at an enhancement of "common" line printer applications. Various mechanisms for predefined elements are more important here than a graphics approach:
- overlays, which may consist of page segments, text, rules and images
- images
- text, which may be in line printer format
- page segments, which may consist of both text and images
CPDS is not really device independent, since object properties and font definitions depend on the printer type. The definitions within the datastream are completed or superseded by information from job control.
Functions
Related structured fields are arranged in a hierarchical fashion to represent CPDS objects. External objects such as a document or a page segment, are made up of structured fields and internal objects, such as a composed-text. These are made up of structured fields and lesser objects etc. At the lowest level, objects are made up of a sequence of structured fields.
Comments may be inserted in the form of NOP (no operation) fields.
A document is built up by (composed text) pages. Every page consists at least of an "active environment group" and may contain composed text blocks, included page segments and image blocks. The active environment group specifies properties of the page:
- Size of the page or overlay (if used in that definition)
- Control for composed text blocks (size etc.)
- Page segments to be loaded into the printer (e.g. logos)
- Coded fonts to be loaded into the printer
- Identification of overlays
- Identification of text strings to be suppressed
- Positioning of the page on the form (the paper)
- Medium descriptor, e.g. to specify measurement units
Text Objects
A composed text block can be used within an overlay (an object to be superimposed on one or more pages), a page segment (an object, which can be placed anywhere on one or more pages) or within a page itself.
Such a block specifies the text by special controls and the text itself. The controls define such things like
- Origin of the text block on the page - this is printer specific.
- Text orientation is defined by inline direction and baseline direction whereas font orientation is defined by inline direction and character rotation (relatively to baseline). This specification depends on the printer. Only orientations of n x 90° are possible.
- A string that can be marked for possible suppression (used in copy modifications)
- Rules, both horizontal and vertical.
- Font references. For simple cases this information may also come from the Job Control.
Graphic Objects
Besides the rules mentioned in the text objects, CPDS does not support any graphical objects. All graphics must be transformed to images.
Image Objects
Image blocks may occur within a composed page, a page segment or an overlay. It specifies the contents of an image and its placement in a page segment or overlay. An image can be simple (one image block describing the total image) or complex. A complex image is built up of image cells. One reason for this is avoiding of blank space (savings both in storage and transmission).
Image objects can be overlayed (ORed) with text. Hence in our example the retort with the Σ may be two images.
Data Representation
Data records, other than line data, are contained in structured fields. Some of them contain both the data to be printed and formatting instructions.
Since these fields are of variable length, they are part of variable length
records, which start with an RDW (record descriptor word), followed by a carriage
control x'5A'
.
A structured field can be up to 32'751 bytes long. It must have an introducer and usually has parameters (control information and/or data to be printed. It also can be padded.
Some structured fields have printer dependent versions. The introducer is built up of the following elements:
- length
- 2 bytes giving the length of the structured field (8...32'751)
- identifier
- 3 bytes, the first of which is always
x'D3'
. These are not mnemonics. - flags
- 1 byte: extension indicator, padding indicator
- sequence number
- 2 bytes: numbers the structured field to help find them in the data stream. Some rules should be observed.
- extension length
- 1 byte extension up to 254 bytes of user defined data can be included.
Miscellaneous
Error Handling
CPDS does not contain any mechanisms for error handling. Since the program interpreting the data stream is on the host, error handling is done there. This program (Printer Service Facility or VM service machine) also handles the error stati of the attached printer. There is no spooling system between these programs and the printer.Font Specifics
Codepages associate binary code points (from the text using the code) with the character in a font. They also define which of the 256 possible 8-bit codes are valid and give the name of the character (itself often a 1 byte code) that will be printed. Codepages are necessary for environments with varying structure of the fonts. Coded font objects may specify single byte fonts or double byte fonts.Fonts for CPDS are some kind of bitmap. The font definitions for the 3800-3 (or 8) and 3820 are not identical. There are differences both in structure and pattern maps. Also the orientation of the font is different. So one must maintain different font libraries for these two types of printers.
Printing Instructions
CPDS can contain information about special operations to be done at the printer like duplex/simplex printing or the positioning of the page on the paper. The number of copies can be specified for each page or the whole document. Also modifications to the copies can be specified. Some definitions may be done in several ways, so a precedence is defined for them.
Sample Definitions
The structure of the CPDS file to produce the mentioned example is shown
here by indentation rather than nested boxes. The mnemonics define the type
of "structured field". The length is not shown explicitly. Meta comments are
enclosed in {_}. xxxx
shows the presence of data/parameters of
the structured fields.
BDT {begin document} BDG {begin document environment group} PGP xxx {page position} MDD xxx {medium descriptor: units of measure} EDG {end document environment group} BCF {begin coded font} CFC xxx {coded font control: constant data} CFI xxxxxxxxxx {coded font index: name codepage, name font} ECF {end coded font} BPG {begin page} BAG {begin active environment group} MCF xxxxx {map coded font} PGD xxx {page descriptor: size of page} CTC xxx {composed text control: constant data} CTD xxx {composed text descriptor: size of text block} EAG {end active environment group} BCT {begin text block} CTX xxxxxxxxxx {composed text data} ECT {end text block} BIM {begin image block} IOC xxx {image output control: origin, scale factor, IID xxx {image input descriptor: image size, ..} ICP xxx {image cell position} IRD xxxxxxxxxxxx {image raster data: the retort} ICP xxx {image cell position} IRD xxxxxxxxxxxx {image raster data: the smoke} EIM {end image block} EPG {end page} EDT {end document}
Software and Hardware
Examples of software generating CPDS files:
- DCF-III
- Document Composition Facility, version 3.
- PMF
- Print Management Facility, a utility to generate forms and page segments.
- PPFA
- Page Printer Formatting Aid [14].
- GDDM
- Graphics Data Display Manager. Used in applications like ICU (Interactive Chart Utility) to generate images.
As far as I know there is no hardware supporting CPDS. The datastream is converted to printer commands by Print Service Facility [4] or VM3812 [5]. The electro-erosion printer (IBM_4250) is not supported by PSF.