Advanced Function Presentation data stream
Advanced Function Presentation Data Stream is the application interface
to Advanced Function Presentation™ (AFP™) based on the
Mixed Object:Document Content Architecture–Presentation (MO:DCA–P).
It is independent of both printers and operating systems.
AFP data stream is a structured data stream. Structured fields are used
to define composed text pages, line format data, and a mixture of line and
composed text data. The structured field is a self-identifying string of bytes
containing data or parameters and must have an introducer, which contains
a length field, an identifier, a flag, and a sequence number. This is followed
by parameter bytes that contain control information or data to be printed.
- Length
- A 2-byte field that specifies the length of the record (not including
the 5A control character).
- Identifier (ID)
- A 3-byte field that specifies the type of the structured field.
- Flag byte
- A 1-byte field that specifies information about the data field.
- Sequence number
- A 2-byte field that identifies the record.
- Control and data
- A text control code, the name of an object, or coordinates for positioning
an image or page segment. The control information is followed by the data
to be printed.
Source programs that generate Advanced Function Presentation
data stream
The following IBM® licensed programs generate Advanced Function Presentation
data streams:
- i5/OS
- Advanced Function Presentation™ Utilities for iSeries™ (AFP Utilities for iSeries)
- Document Composition Facility (DCF)
- DisplayWrite/390 (DW/390)
- Graphical Data Display Manager (GDDM®)
- zSeries® Advanced Function Presentation utilities:
- Page Printer Formatting Aid (PPFA)
- Overlay Generation Language (OGL)
- Font Library Service Facility (FLSF)
- Print Management Facility (PMF)
- Print Service Access Facility (PSAF)
Advanced Function Presentation
Advanced Function Presentation data stream describes what the page of data
looks like and refers to printer resource objects by name, assuming that they
are resident on the system where the actual printing is to take place and
not on the system where the output was spooled. The printer resource objects
that are resident on the system are downloaded to the printer by the processor
when needed.
The iSeries server uses the following objects when processing AFP data stream:
- AFP data stream spool buffers
- The AFP data stream print file is sent to the system in one or more
buffers. These buffers contain single or multiple contiguous structured fields.
A pointer to the buffer and the length of each buffer are passed to the system.
- AFP data stream resource objects
- Resource objects contain data and control information that can be used
in printing a job. These can be shared by different pages in the same job.
A resource is composed entirely of structured fields.
Types of resources
are:
- Fonts
- Form definitions
- Page segments
- Overlays
- Page definitions
- Resources stored in the integrated file system
These resources can be transmitted from a host zSeries to an iSeries server
or loaded from tape into space objects using i5/OS commands. Overlays and
page segments can be created by AFP Utilities for iSeries.
- Messages
- Messages generated during the processing of AFP data stream print files
are placed in the printer writer job log.
Mixed Object: Document Content Architecture
(MO:DCA)
Mixed Object Document Content Architecture (MO:DCA) is an object-oriented
data stream that is designed to allow consistent printing that is independent
of operating system or device. An object is a collection of data that can
be treated as a unit, such as text, images, and graphics. This architecture
supports:
- Coexistence and migration of existing IBM document architecture and printer data
streams
- Device independence
- Separation of functions to simplify transformation of objects into other
data streams
- National Language Support
- Office Document Architecture (ODA) support
- Standard Generalized Markup Language (SGML)
The data stream for an MO:DCA document consists of various objects as well
as the logical and layout structure of the document. The logical structure
defines the logical content of the document—chapters, figures, and lists.
The following layout structure defines the way the data should be presented.
Figure 1. MO:DCA Document Structure
- BDT (Begin document)
- Indicates the beginning of the document
- Resource groups
- Specifies fonts, overlays, and segments so that these objects can be
transmitted as part of the data stream. They can be referred to by an MO:DCA
Include structured field.
- Master environment groups
- Specifies the processing environment, such as space definitions, suppression
of data, number of copies, and internal data stream references.
- Pages
- Contains objects that are part of the document. These objects could
be text, graphics, and images.
- EDT (End document)
- Indicates the end of the document.
The following different types of objects make up MO:DCA. All of these
objects are supported by IPDS™:
- Bar Code Object Content Architecture (BCOCA)
- Image Object Content Architecture (IOCA)
- Graphics Object Content Architecture (GOCA)
- Presentation Text Object Content Architecture (PTOCA)
- Font Object Content Architecture (FOCA).
- Bar Code Object Content Architecture (BCOCA)
- A bar-code object could contain "draw rule" commands or raster
data, depending on whether the bar code is to be drawn as a graphics object
or has been scanned into the data stream as an image. A bar code object containing
draw rule commands is built up using only lines of a specified length and
width. A graphics object is constructed from a number of primitives, such
as lines, arcs, symbols, shaded areas, and point arrays.
- Image Object Content Architecture (IOCA)
- IOCA represents images in device-independent format. A standard set
of constructs has been defined to describe the image data, the characteristics
of that data, and manipulation functions that can be performed on the data.
The image content is inserted in an image segment.
- Graphics Object Content Architecture (GOCA)
- GOCA describes complex pictures. These pictures are formed from a collection
of primitives, such as lines, arcs, characters, symbols, and shaded areas
or point arrays. Each of these primitives has its own set of attributes,
such as line width, orientation, and resolution. In addition to these attributes,
there is a set of general drawing attributes like color, which apply to all
primitives
- Presentation Text Object Content Architecture (PTOCA)
- PTOCA describes the text part of a document. The presentation text
object, in common with the other objects, is designed not only to be carried
by, but to be an integral part of, the data stream, providing the following:
- Structured field introducer and syntax for the structured field
- Begin/end object structure
- Control of alternate action selection for error recovery
- Passing of exception conditions back to the originating process
- Initial state of the object
- Relationship of presentation text objects to other objects contained in
the data stream.
Two structured fields provide the necessary presentation information
to the printer:
- P T descriptor structured field
- Defines several positional parameters for the object
- P T data structured field
- Contains the presentation text and the control sequences for positioning
graphic characters. These graphic characters are defined within the coded
fonts.
- Font Object Content Architecture (FOCA)
-
In order to achieve uniform document presentation output, it is essential
that font resources be consistently defined and put into effect. These resources
must be identified by means of a constant, unvarying set of parameters.
FOCA makes it possible to achieve the required degree of consistency by defining:
- A common font and character definition model that can be used by all products
and architectures as the basis for font applications
- A composite set of parameters specific to a font resource and references
to that resource
- A device-and-technology-independent method of defining font measurements
- The specification of formats for conveying font information to suit the
application
FOCA defines the parameter content of:
- IBM font resources
- References to the font resources
- Information accessed by the font resources