[Main topics] [Navigation]

CPDS

CPDS is short for Composed Page Data Stream . This datastream consists of the following entities:

The format of the print data set determines the type of the data stream. There are three types: This composed data stream is processed by Print Service Facility which in turn generates the printer commands. The printer itself has limited capabilites concerning storage of fonts etc.

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:

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:

Besides other special things a "document environment group" may be defined for a document, which will specify: Object properties (size, coordinates) are measured in pels (1/240"). Recent changes (new releases) made this property to become a parameter in the structured fields. Also the differences in font specifications are at least circumvented. Thus CPDL now should be device independent.

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

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.

 

[Main topics] [Navigation]
 URL:  Created: 2003-09-17  Updated:
© Docu+Design Daube, Zürich    
  Business of Docu + Design Daube Documentation issues Sharing information Klaus Daube's personal opinions Guests on this site Home of Docu + Design Daube To main page in this category To first page in series To previous page in series To next page in series To bottom of page To top of page Search this site Site map Mail to webmaster To bottom of page To top of page