Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
175 views106 pages

Printing Advanced Function Presentation (AFP) : Ibm I 7.2

Download as pdf or txt
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 106

IBM i

7.2

Printing
Advanced Function Presentation (AFP)

IBM
Note
Before using this information and the product it supports, read the information in “Notices” on page
95.

This document may contain references to Licensed Internal Code. Licensed Internal Code is Machine Code and is
licensed to you under the terms of the IBM License Agreement for Machine Code.
© Copyright International Business Machines Corporation 2006, 2013.
US Government Users Restricted Rights – Use, duplication or disclosure restricted by GSA ADP Schedule Contract with
IBM Corp.
© InfoPrint Solutions Company 2008, 2013.
Contents

Advanced Function Presentation (AFP)...................................................................1


What's new for IBM i 7.2..............................................................................................................................1
PDF files for AFP...........................................................................................................................................2
AFP concepts................................................................................................................................................3
Overview of AFP printing........................................................................................................................ 3
Data streams...........................................................................................................................................4
Line data............................................................................................................................................ 4
Mixed data......................................................................................................................................... 4
zSeries and z/OS data....................................................................................................................... 4
AFP resources.........................................................................................................................................5
AFP fonts........................................................................................................................................... 5
Form definitions................................................................................................................................ 6
Object containers.............................................................................................................................. 7
Overlays.............................................................................................................................................8
Page definitions.................................................................................................................................8
Page segments.................................................................................................................................. 9
Resources in the integrated file system......................................................................................... 10
Color and grayscale printing using AFP..........................................................................................10
AFP color and grayscale solutions............................................................................................ 10
Color printing concepts............................................................................................................. 11
Grayscale printing concepts......................................................................................................14
Color Management.................................................................................................................... 15
AFP Color Management.............................................................................................................17
AFP Resource Installer..............................................................................................................28
TrueType and OpenType fonts............................................................................................................. 28
Resource access tables.................................................................................................................. 29
How TrueType and OpenType fonts differ from AFP fonts.............................................................29
Resource libraries.................................................................................................................................31
Resource library lists...................................................................................................................... 31
AFP font libraries............................................................................................................................ 31
PSF configuration options.................................................................................................................... 32
PSF configuration objects...............................................................................................................32
IPDS pass-through.................................................................................................................... 33
How page definitions, form definitions, and printer files interact................................................. 35
Planning for AFP.........................................................................................................................................36
Determining whether PSF is required..................................................................................................36
Installing PSF........................................................................................................................................37
Ensuring that you have the necessary AFP resources........................................................................ 38
Getting started with AFP............................................................................................................................38
Obtaining AFP resources......................................................................................................................38
Fonts provided by IBM i.................................................................................................................. 39
Purchasing fonts............................................................................................................................. 40
Creating AFP resources.................................................................................................................. 41
Receiving AFP resources from another system............................................................................. 41
Receiving fonts from zSeries.....................................................................................................42
Receiving AFP resources inline in the data stream.................................................................. 42
Receiving resources and AFPDS data sent to network files.....................................................42
Specifying AFP resources.....................................................................................................................44
Specifying a form definition............................................................................................................44
Specifying a page definition............................................................................................................45
Specifying a PSF configuration object............................................................................................ 45

iii
Specifying an overlay...................................................................................................................... 46
Specifying an AFP font....................................................................................................................47
Specifying a TrueType or OpenType font........................................................................................47
Example: Specifying a font............................................................................................................. 48
Specifying a page segment.............................................................................................................50
Specifying an object container....................................................................................................... 51
Search order of library list.............................................................................................................. 51
Why you should use a library list.............................................................................................. 51
Search order for resources that are not specified by the AFPRSC keyword............................52
Search order for resources that are specified by the AFPRSC keyword..................................52
The QIBM_AFP_RESOURCES_PATH environment variable..................................................... 52
Search order for Color Management Resources.......................................................................53
Creating AFP data.................................................................................................................................53
Printing AFP data with PSF...................................................................................................................54
Printing AFP data generated on IBM i............................................................................................ 54
Printing data sent to IBM i from zSeries.........................................................................................55
Printing data sent from zSeries to an IBM i network file..........................................................55
Printing data sent from zSeries to an IBM i output queue....................................................... 55
Transforming IPDS data to PDF........................................................................................................... 56
Transforming spooled files to PDF without manual setup.............................................................56
Prerequisites............................................................................................................................. 57
Transforming a spooled file to PDF...........................................................................................57
Transforming spooled files to PDF with manual setup.................................................................. 57
Prerequisites............................................................................................................................. 57
Transforming a spooled file to PDF...........................................................................................57
Setting up your PSF configuration object................................................................................. 57
Changing the input file to create multiple output files or an indexed file................................59
Configuring a device for PDF conversion.................................................................................. 59
Sending the PDF file as email......................................................................................................... 60
Encrypting the PDF file................................................................................................................... 61
Suppress message text in an email................................................................................................62
Variable data taken from spooled file attributes........................................................................... 62
Generic support for PDF map object selection criteria................................................................. 63
Configuring PSF..........................................................................................................................................63
Configuring PSF by using a device description.................................................................................... 64
Configuring PSF by using a PSF configuration object..........................................................................64
Managing PSF.............................................................................................................................................64
Enabling IPDS pass-through support.................................................................................................. 65
Sharing print sessions.......................................................................................................................... 65
Automatic session recovery................................................................................................................. 66
Disabling offset stacking and edge marking........................................................................................67
Specifying public data authority for directories created by PSF.........................................................67
Preventing the copying of spooled file attribute USRDFNOPT when respooling AFP........................ 68
Line and mixed data stream support.........................................................................................................69
Special characters used with line data................................................................................................ 69
Printer file parameters used with line and mixed data....................................................................... 70
Considerations and restrictions when using line data or mixed data.................................................71
Sending data from zSeries to IBM i........................................................................................................... 73
Sending print data from VM to the output queue of a user ID............................................................ 73
Sending print data from z/OS to an IBM i output queue..................................................................... 74
Sending data from zSeries to IBM i network files............................................................................... 75
AFP reference information.........................................................................................................................75
Form definitions included with the operating system.........................................................................76
Page definitions included with the operating system......................................................................... 76
CL commands for PSF configuration objects.......................................................................................78
CL commands for device descriptions.................................................................................................79
zSeries parameters and corresponding IBM i printer file parameters............................................... 80
American National Standard carriage control characters...................................................................82

iv
Machine code carriage control characters.......................................................................................... 83
Troubleshooting mapping problems......................................................................................................... 85
Error message reason codes................................................................................................................85
The diagnostic spool file (PSFTRACE)..................................................................................................85
Requesting the diagnostic spool file.............................................................................................. 85
Format of the diagnostic spool file................................................................................................. 86
Automatically generated PSFTRACE file........................................................................................ 87
User-requested PSFTRACE file.......................................................................................................88
Related information for AFP...................................................................................................................... 90

Notices................................................................................................................95
Programming interface information.......................................................................................................... 96
Trademarks................................................................................................................................................ 96
Terms and conditions.................................................................................................................................97

v
vi
Advanced Function Presentation (AFP)
IBM® i has powerful printing and display functions. With Advanced Function Presentation (AFP) you can
present information using overlays, bar codes, graphics, images, and more. IBM i supports a variety of
powerful printing and presentation solutions.
This information illustrates some of the core IBM i printing functions, and helps you plan for and configure
these functions.
Note: Read the “Code license and disclaimer information” on page 93 for important legal information.

What's new for IBM i 7.2


Read about new information for the Advanced Function Presentation (AFP) topic collection.

Color Management
Print Services Facility (PSF) is enhanced to provide color management support for IPDS printers. For more
information, see “Color and grayscale printing using AFP” on page 10.

Data object resource access tables


PSF provides support for the use of Data Object Resource Access Tables for IFS-based resources. Color
management resources can be specified in Data Object Resource Access Tables for AFP and non-AFP
resources without changing an application. For more information, see “Resource directory management”
on page 26.

Changes to the TrueType and OpenType fonts


• The font names of the TrueType and OpenType fonts provided in option 43 of the IBM i have changed.
Support for the use of the old names is provided.
• More directories that contain these fonts can be specified by using environment variable
QIBM_FONT_RESOURCES_PATH specified at either the job level or system level.
For more information, see TrueType and OpenType fonts.

Suppress message text in an email


PSF offers the capability to send emails without any text placed into the body of an email. For more
information, see “Suppress message text in an email” on page 62.

PDF map generic support


Generic values can be specified for the User data and Form type selection criteria in a PDF map entry. For
more information, see “Generic support for PDF map object selection criteria” on page 63.

Variable data taken from spooled file attributes


This function causes variable data to be inserted into the subject and body text of an email that is sent by
PSF. The variable data can be taken from any of the following: User data spooled file attribute, the Form
type spooled file attribute, mail tag that is specified on the User defined data spooled file attribute or the
routing tag that is contained within spooled file data. For more information, see “Variable data taken from
spooled file attributes” on page 62.

© Copyright IBM Corp. 2006, 2013 1


Preventing the copying of the spooled file attribute USRDFNOPT when respooling
AFP
When the AFP respool function is done, PSF copies the User Defined Option (USRDFNOPT) spooled file
attribute from the original spooled file to the new AFP spooled file. If the original spooled file is split into
multiple respooled files, then each of the respooled files contains the USRDFNOPT spooled file attribute
of the original spooled file. If you want to prevent the User Defined Option from being copied, you can
do so. For more information, see “Preventing the copying of spooled file attribute USRDFNOPT when
respooling AFP” on page 68.

Add user directories to PSF's Java class path


If your PDF user program starts a Java™ program, you can tell PSF the directory where the Java program
can be found. PSF appends the directory to its class path. For more information, see PSF Mapping Exit
Program.

How to see what's new or changed


To help you see where technical changes were made, the information center uses:
• The image to mark where new or changed information begins.
• The image to mark where new or changed information ends.
In PDF files, you might see revision bars (|) in the left margin of new and changed information.
To find other information about what's new or changed this release, see the Memo to Users.
Related reference
Infoprint Server for iSeries: User's Guide (G544-5775) PDF

PDF files for AFP


You can view and print a PDF file of this information.
To view or download the PDF version of this document, select Advanced Function Presentation (AFP).
You can view or download the related topic PDF Basic printing.

Saving PDF files


To save a PDF file on your workstation for viewing or printing:
1. Right-click the PDF file in your browser (right-click the link above).
2. Click the option that saves the PDF locally.
3. Navigate to the directory in which you want to save the PDF file.
4. Click Save.

Downloading Adobe Reader


You need Adobe Reader installed on your system to view or print these PDFs. You can download a free
copy from the Adobe Web site (www.adobe.com/products/acrobat/readstep.html) .
Related concepts
Related information for AFP

2 IBM i: Advanced Function Presentation (AFP)


Product manuals, IBM Redbooks publications, Web sites, and other information center topic collections
contain information that relates to the Advanced Function Presentation topic collection. You can view or
print any of the PDF files.

AFP concepts
Use this information to understand how AFP works on IBM i.
Read these topics for an overview of the Advanced Function Presentation (AFP) and related concepts.
Related reference
AFP reference information
Look up information about PSF, such as the form definitions and page definitions included with your
system, here.

Overview of AFP printing


AFP is an architecture-based system of hardware and software for creating, formatting, viewing,
retrieving, printing, and distributing information using a wide variety of printer and display devices.
Advanced Function Presentation (AFP) is the original, integrated data stream on IBM i for generating fully
composed pages of data. Traditional line-mode print applications compose a line at a time down the page
(typically continuous form pages), whereas AFP composes the entire page before printing. In AFP, page
elements such as text, images, bar codes, page segments, and overlays, can be specified in any order at
any position in the page. This is called all points addressability.
Advanced Function Presentation data stream (AFPDS) is a printer-independent data stream that
composes full pages within a document. Many of the page elements you can use with AFP are special
objects called resources.

AFPDS
AFPDS files can be generated on IBM i as well as many other platforms. These operating systems can
send AFPDS files to each other for printing on AFP-configured printers.

PSF
Print Services Facility (PSF) combines print data with resources to manage and control data transmitted
to AFP printers. PSF accepts various data streams, transforms these data streams into the data stream
required by each printer, and then transmits the data to the printer. PSF uses processing and printing
options specified by the user and the installation during these processes. In addition, PSF does the
following:
• Manages resources.
• Verifies part of the input data stream's syntax (the printer verifies the remainder of the syntax).
• Provides diagnostic aids, which provide information that can be used for problem analysis.
• Reports the status of a printer to the system operator.
• Provides accounting information.
• Provides error-recovery procedures for AFP printers. If a spooled file does not print due to a printer
problem such as a paper jam, PSF retransmits the affected pages when the problem at the printer is
corrected.
To use AFP support on IBM i, typically PSF must be installed. However, if the ASCII data stream is
converted through Host Print Transform, you can use the AFP support without installing PSF.
Related concepts
AFP resources
Advanced Function Presentation (AFP) resource objects contain data and control information.
Determining whether PSF is required

Advanced Function Presentation (AFP) 3


You must install PSF if you use certain printers, use IBM i to print line or mixed-mode data, or use certain
printer file parameters or DDS keywords.
Creating AFP data
There are several different ways to generate Advanced Function Presentation (AFP) data. You can use a
printer file, DDS keywords, Infoprint Server, the AFP printer driver, or Advanced Function Printing Utilities.

Data streams
Advanced Function Presentation (AFP) applications can generate Advanced Function Printing data stream
(AFPDS), line, or mixed (AFPDS and line) spooled files.
These applications can run on IBM i or on other platforms. IBM i can receive spooled files from other
operating systems.

Line data
Line data is record-oriented readable text.
The generating application can partially format line data by doing one of these:
• Adding carriage control characters to the first column of each record
• Adding blank lines to adjust vertical positioning
• Using skipping and spacing controls (such as on an RPG output specification)
Line data is supported as a device type in the printer file commands through the DEVTYPE(*LINE)
specification. The printer file commands follow:
• Create Printer File (CRTPRTF)
• Change Printer File (CHGPRTF)
• Override with Printer File (OVRPRTF)
For more information about line data, see the AFP Programming Guide and Line Data Reference, which can
be found at the AFP Consortium (AFPC) website http://www.afpcinc.org (http://www.afpcinc.org).
Related concepts
Line and mixed data stream support
Use this information to understand how PSF supports line and mixed data on IBM i.

Mixed data
Mixed data is line data intermixed with AFPDS data.
Mixed data can also be called *AFPDSLINE data. Only certain AFPDS structured fields are allowed to be
intermixed with line data. For more information about mixing line data and AFPDS structured fields, see
the AFP Programming Guide and Line Data Reference, which can be found at the AFP Consortium (AFPC)
website http://www.afpcinc.org (http://www.afpcinc.org).
Related concepts
Line and mixed data stream support
Use this information to understand how PSF supports line and mixed data on IBM i.

zSeries and z/OS data


IBM i can receive data from zSeries systems.
From an Advanced Function Presentation (AFP) perspective, data sent to IBM i from a zSeries system can
be any of these:
• Print data (letters, documents, and so on)
– Advanced Function Presentation data stream (AFPDS).
– AFPDSLINE (or mixed data). AFPDSLINE is data that has a mixture of line data and AFPDS data.

4 IBM i: Advanced Function Presentation (AFP)


– LINE (line data). Line data is data that has been prepared for printing on a line printer. Line data does
not contain all placement or presentation information that is needed for printing on page printers.
• Resources
Note: In these topics, the term zSeries means zSeries and z/OS® unless otherwise stated.

AFP resources
Advanced Function Presentation (AFP) resource objects contain data and control information.
This information can be shared by different pages within a spooled file as well as different spooled files.
Examples of resources are fonts, which define the characters used to print text, and page segments,
which can include images and text.
Resources can be stored and accessed from within the operating system being used. By referring to the
name of the stored resource, many data streams can share the same resources. For more information
about resources, see the descriptions of the different resource types.
Related concepts
TrueType and OpenType fonts
There is extensive operating system support for TrueType fonts, and they are popular with PC
applications. Consequentially, TrueType is probably the most prevalent font technology in the industry
today. OpenType is an extension of the TrueType font format.
Resource libraries
Advanced Function Presentation (AFP) resource libraries group resources of the same type.
Ensuring that you have the necessary AFP resources
You need to determine what resources you need for your Advanced Function Presentation (AFP)
application and ensure that they are stored in appropriate locations.
Related tasks
Printing data sent to IBM i from zSeries
PSF can print data that was generated on zSeries. This data might be AFP, AFPDSLINE (AFP data mixed
with line data), or line data. The data might be sent to network files or directly to an output queue.

AFP fonts
A font is a collection of characters of a certain size, typeface, and type style. Advanced Function
Presentation (AFP) fonts, also called Font Object Content Architecture (FOCA) fonts, are the standard
fonts used for Intelligent Printer Data Stream (IPDS) output. AFP fonts are made up of a code page and
a character set. All AFP fonts are encoded as either single-byte or double-byte fonts, depending on the
language for which they are being used.
Each character in a font is identified by a 1-byte (single-byte) or a 2-byte (double-byte) code. The internal
structure of fonts depends on whether the font is for a phonetic or a non-phonetic writing system. An
example of a phonetic writing system is English. An example of a non-phonetic writing system is Kanji.
At least two resources are needed to make up a font: a font character set and a code page. The
relationship between code pages and font character sets is illustrated in Figure 1 on page 6. A third
resource, a coded font, can define a font by naming a font character set and a code page.
Font character set
This resource contains the patterns for each character in the font and associates an 8-byte character
identifier with each pattern. This resource also contains descriptive information for the entire
character set.
Code page
This resource associates code points with character identifiers within a font character set, each
representing a character pattern. A code point is an 8-bit binary number representing one of 256
potential characters.
Coded font
This resource associates one or more code pages with the appropriate font character sets.

Advanced Function Presentation (AFP) 5


Figure 1. Translation of a keyboard character into a printed character

Related concepts
Obtaining AFP resources
There are many sources of Advanced Function Presentation (AFP) resources.
AFP font libraries
IBM supplies several AFP font libraries. In addition, you can create a library list that allows AFP to locate
and use other fonts.
TrueType and OpenType fonts
There is extensive operating system support for TrueType fonts, and they are popular with PC
applications. Consequentially, TrueType is probably the most prevalent font technology in the industry
today. OpenType is an extension of the TrueType font format.
Related reference
Specifying an AFP font
There are many different tools you can use to specify Advanced Function Presentation (AFP) fonts in your
document. Each tool has different capabilities.
How TrueType and OpenType fonts differ from AFP fonts
When using TrueType fonts, you will see differences in how the fonts are specified, managed, and
installed when compared to Advanced Function Presentation (AFP) fonts.

Form definitions
A form definition is an Advanced Function Presentation (AFP) resource object that defines the
characteristics of the physical form to be printed on.
Form definitions define these characteristics:
• Overlays to be used
• Position of page data on the form
• Rotation
• Duplexing
• Input drawer
• Formfeed type
• Print quality
• Number of copies of each page and the modifications that apply to each set of copies
• List of Color management resources (CMRs) that might be used

6 IBM i: Advanced Function Presentation (AFP)


Whenever you are printing to a printer configured as AFP(*YES), a form definition is required. If you
do not specify a form definition on the printer file, an inline form definition is built from the printer
file parameters. If you specify a form definition, no inline form definition is built from the printer file
parameters. In this case, if you send the data to an AFP printer, Print Services Facility (PSF) ignores some
printer file parameters.
AFP-related form definitions can be:
• Provided with IBM i
• Created with the IBM Infoprint Designer for iSeries licensed program
• Downloaded from zSeries
• Included inline from zSeries
• Created automatically from printer file parameters
Related concepts
How page definitions, form definitions, and printer files interact
You can use a printer file to specify some of the same options as you can specify with a page definition
and a form definition. This topic describes how PSF chooses an option when a printer file is used with a
page definition and form definition.
Obtaining AFP resources
There are many sources of Advanced Function Presentation (AFP) resources.
Specifying a form definition
To use or identify a fully qualified form definition, specify a value in the FORMDF parameter with a CL
command.
Related reference
Form definitions included with the operating system
This topic lists the form definitions that are provided with IBM i in library QSYS.

Object containers
Object containers are used to carry non-Object Content Architecture (OCA) objects in an Advanced
Function Presentation (AFP) data stream.
Some such objects are Graphics Interchange Format (GIF) and Tagged Image File Format (TIFF) images.
These non-OCA objects can be wrapped or unwrapped. Wrapped objects are carried in a Mixed Object
Document Content Architecture (MO:DCA) envelope called an object container. Unwrapped objects
are unaltered from their original form. If the object is to be carried in MO:DCA resource groups and
interchanged, it must be wrapped.
Note: Print Services Facility (PSF) does not check an object container's contents. Therefore, it is up to the
user to verify that the printer can handle the type of data in the object container. The Infoprint Server PDF
subsystem works like a printer. For information about the types of images it can accept, see the Infoprint
Server for iSeries: User's Guide.
Object containers, even though they contain non-OCA objects, are similar to other AFP resources in these
ways:
• They can be mapped. A mapped resource is downloaded once per spooled file, no matter how many
times the resource is referenced in the spooled file.
• They can be included on a page.
• They can be captured in the printer.
Using object containers has several benefits:
• You can reference several types of MO:DCA objects in a spooled file without having to include them in
an overlay or page segment. These image types are image data, bar code data and graphics data.
• You can scale and rotate these objects. With page segments and overlays, you need to create one copy
of the object in each orientation needed.

Advanced Function Presentation (AFP) 7


• You can include images larger than 16 MB in your output. If an image exceeds 16 MB, the image cannot
be stored as a page segment object.
• Print applications can specify the use of non-OCA objects which refer to other non-OCA objects, such as
color mapping tables (which are printer-resident). These are called secondary resources.
• Applications can use color objects with Intelligent Printer Data Stream (IPDS) printers.
• The IBM Infoprint Server for iSeries licensed program's PDF subsystem accepts object containers with
certain types of images as input.
Related concepts
Obtaining AFP resources
There are many sources of Advanced Function Presentation (AFP) resources.
Specifying an object container
There are different ways to include object containers in your data, depending on your installation and how
you want to use them.
Related information
Infoprint Server for iSeries: User's Guide (G544-5775) PDF

Overlays
Overlays, also known as electronic forms, are a collection of predefined data such as lines, shading, text,
boxes, or logos. They can be merged with variable data on a sheet while a spooled file is being processed.
You can use the licensed program IBM Infoprint Designer for iSeries, the licensed program Advanced
Function Printing Utilities, the licensed program IBM Infoprint Server for iSeries, or the Advanced
Function Presentation (AFP) printer drivers provided for Microsoft Windows to create overlays on IBM
i. Overlays can also be downloaded from other operating systems, such as zSeries.
When overlay data is received from the zSeries system, you place it in a data file. To convert the page
overlay data to a format that can be used by IBM i, use the Create Overlay (CRTOVL) CL command.
Related concepts
Obtaining AFP resources
There are many sources of Advanced Function Presentation (AFP) resources.
Specifying an overlay
To use overlays, specify them in the front and back overlay parameters of the printer file being used with
your application.
Related reference
Create Overlay (CRTOVL) CL command

Page definitions
Page definitions are resources that format and compose line data into logical pages.
A page definition contains printing controls that specify:
• Where data from each input record is to be printed
• Page size (height and width)
• Data fields that can be suppressed
• Print positions for line-data records containing carriage control characters
• Inline printing direction
• Number of lines per inch
• List of page segments that might be used
• List of overlays that might be used
• Record definitions
• Constant data to be printed

8 IBM i: Advanced Function Presentation (AFP)


• List of Color management resources (CMRs) that might be used
• List of fonts that might be used
Whenever you are printing to a printer configured as AFP(*YES) and you are printing line or mixed data, a
page definition is required. If a page definition is not specified on the printer file, an inline page definition
is built from the printer file parameters.
If you specify a page definition and also specify line data or mixed data, no inline page definition is built
from the printer file parameters. In this case, if you send the data to an Advanced Function Presentation
(AFP) printer, Print Services Facility (PSF) ignores some print parameters.
Related concepts
How page definitions, form definitions, and printer files interact
You can use a printer file to specify some of the same options as you can specify with a page definition
and a form definition. This topic describes how PSF chooses an option when a printer file is used with a
page definition and form definition.
Obtaining AFP resources
There are many sources of Advanced Function Presentation (AFP) resources.
Specifying a page definition
To use or identify a fully qualified page definition, specify the PAGDFN parameter on a CL commands.
Related reference
Page definitions included with the operating system
This topic lists the page definitions that are provided with IBM i in library QSYS.

Page segments
Page segments are objects containing composed text and images that are prepared before formatting and
included during printing.
For example, you might want to repeat constant data at different positions on a page or overlay. You might
also want to repeat that data on different pages or overlays. You can do this by using a page segment. A
company logo is an example of this type of data.
You can use the IBM Infoprint Designer for iSeries licensed program, the Advanced Function Printing
Utilities licensed program, the IBM Infoprint Server for iSeries licensed program, or the Advanced
Function Presentation (AFP) printer drivers provided with Microsoft Windows 2000 or Windows XP, to
create page segments on IBM i. Page segments can also be downloaded from zSeries systems. The page
segments must be stored in an accessible library.
When page segment data is received from the zSeries system, you place it in a data file. To convert the
page data to a format that can be used by IBM i, use the Create Page Segment (CRTPAGSEG) command.
Related concepts
How page definitions, form definitions, and printer files interact
You can use a printer file to specify some of the same options as you can specify with a page definition
and a form definition. This topic describes how PSF chooses an option when a printer file is used with a
page definition and form definition.
Obtaining AFP resources
There are many sources of Advanced Function Presentation (AFP) resources.
Specifying a form definition
To use or identify a fully qualified form definition, specify a value in the FORMDF parameter with a CL
command.
Specifying a page segment
A page segment object can be built into your application output in a number of ways.
Related reference
Create Page Segment (CRTPAGSEG) CL command
Form definitions included with the operating system

Advanced Function Presentation (AFP) 9


This topic lists the form definitions that are provided with IBM i in library QSYS.

Resources in the integrated file system


Print Services Facility (PSF) can process several types of Advanced Function Presentation (AFP) and
non-AFP resources that are stored in the integrated file system. These are objects that are not stored
within a page segment or overlay.
Following are the AFP resource types that can be stored in the integrated file system:
• Image Object Content Architecture (IOCA)
• Graphics Object Content Architecture (GOCA)
• Bar Code Object Content Architecture (BCOCA)
• Color Management Object Content Architecture (CMOCA)
All non-AFP resources are placed in the integrated file system. PSF processes any non-AFP resource that
is specified. However, the actual support of non-AFP resources depends on the printer to which the data
is being sent.
The Data description specifications (DDS) keyword AFPRSC is used to identify any resources stored in the
integrated file system. For information about DDS keywords used with printer files, see the DDS for printer
files topic in the Programming category. There are several benefits of using the AFPRSC keyword:
• You do not need to create objects as a page segment.
• You can use non-AFP resources.
• You can obtain objects from other operating systems and reference them without further modification.
You do not need to create them into a page segment.
• Some applications generate AFP resources and write them to the integrated file system. PSF can access
those resources without requiring you to create a page segment or overlay.
When referencing resources in the integrated file system, you must understand how the operating system
searches for those resources. See the “Search order of library list” on page 51 topic for information.
Related concepts
Ensuring that you have the necessary AFP resources
You need to determine what resources you need for your Advanced Function Presentation (AFP)
application and ensure that they are stored in appropriate locations.

Color and grayscale printing using AFP


Printing documents in full color or with high-quality black and white (grayscale) images is more complex
than printing black and white or spot-color documents. Understanding some of the principles of color
and grayscale printing and how various products can fit into color and grayscale solutions can help you
integrate color and grayscale printing with your current operations or expand to implement new color
workflows.

AFP color and grayscale solutions


You can assemble printing products in different configurations to support Advanced Function
Presentation (AFP) color and grayscale printing, including configurations that use the AFP Color
Management Object Content Architecture (CMOCA) to provide optimal performance and color accuracy in
high-speed color printing.

Color printing without explicit color management


You can include color images or specify colors for AFP objects in your spooled files and send them to an
AFP color printer. The color images and objects print in color, which is based on the default settings in
your print server and printer.
If you like the colors that the default color management settings provide, or if it is not essential that you
print in exactly the right colors, you probably do not need to implement a full color management solution.

10 IBM i: Advanced Function Presentation (AFP)


However, if you want better control over the consistency and accuracy of your colors for devices, you
might consider color management at some point in the future.
To understand some of the basic concepts about color printing, see:
• “Color printing concepts” on page 11
• “Grayscale printing concepts” on page 14

Resources included inline


Most often, print bureaus use document composition software to generate highly customized and
personalized color output. AFP color management is largely built into the document composition tools
that support their processes. The software puts all the resources that the printer needs into the spooled
file and sends it to a print server. The print server sends the spooled file to the printer, and the printer
uses the resources as appropriate.
By using this method, you know that the required resources, including the resources that are required
for color management, are available for any spooled file that is sent to the printer. However, including all
the resources can make the spooled file large, and moving large spooled files through your system might
slow down system performance. Also, you might not be able to save resources that are downloaded with a
spooled file on the printer so they can be reused without being downloaded later.
For more information about color printing, see:
• “Color printing concepts” on page 11
• “Color Management” on page 15

Resources stored and managed centrally


To take full advantage of the AFP CMOCA, you can store your color and image resources in a central
resource directory, and your print system can manage those resources. This option optimizes system
performance by:
• Creating some of the color management resources for you automatically
• Reducing the number of color conversion resources that the system creates at print time by generating
link color conversion color management resources in advance
• Reducing the size of some images by removing embedded profiles when you store them, yet still
retaining the association between the image and the profile
• Enabling you to mark resources as capturable, so they can be saved on the printer and used in other
spooled files without being downloaded again
For an introduction to the full AFP CMOCA and how you might implement it, see:
• General information about color and grayscale printing and color management:
– “Color printing concepts” on page 11
– “Grayscale printing concepts” on page 14
– “Color Management” on page 15
• “AFP Color Management” on page 17
• “AFP Resource Installer” on page 28

Color printing concepts


Color printing is significantly more complicated than black and white printing. If you understand some of
the complexities, you can make the transition from black and white printing to grayscale or color printing
more smoothly.

Color spaces and ICC profiles


Presentation devices, such as computer monitors and printers, create colors differently. Because of these
differences, colors must be described differently for each device. The different methods of describing

Advanced Function Presentation (AFP) 11


colors are called color spaces. In addition, each device might have one or more International Color
Consortium (ICC) profiles that are associated with it. ICC profiles are used when an image or another
object is converted to the color space of a different device.
Each device has its own individual color space and range of colors that it can display or print. The color
space specifies how color information is represented in an image when it is displayed on a particular
device. As the image is passed from one device to the next, the color information about the image is
converted from the color space of the source device to the color space of the destination device. Because
color spaces do not exactly match between devices, some of the color information can be lost or modified
in the conversion process.
A color space is a representation of the individual colors that can be combined to create other colors. The
following are color spaces that are relevant to printing:
• RGB
In an RGB color space, red, green, and blue light are combined in different amounts and intensities to
create different colors. RGB colors are often specified as single-byte integers numbered from 0 through
255. You can specify 256 levels of intensity for each of the three colors. For example:
– R=0, G=0, B=0 yields black
– R=255, G=255, B=255 yields white
– R=251, G=254, B=141 yields a pale yellow
– R=210, G=154, B=241 yields a light purple
Devices such as monitors, digital cameras, and scanners generally use RGB color spaces to describe
colors. Two standard implementations of RGB color spaces are sRGB, which is most often used for web
graphics, and Adobe RGB (1998), which IBM recommends for graphics that are printed.
• CMYK
In a CMYK color space, cyan (bright blue), magenta (bright red-pink), yellow, and black pigments
are combined to create different colors. CMYK values are often represented as a percentage. The
percentage represents the portion of a particular area of paper that is covered by ink or toner. For
example:
– C=0%, M=0%, Y=0%, K=100% yields black
– C=0%, M=0%, Y=0%, K=0% yields a blank area on the page
– C=1.6%, M=0%, Y=44.7%, K=.4% yields a pale yellow
– C=17.6%, M=39.6%, Y=5.5%, K=5.5% yields a light purple
Color printers use the CMYK color space; they are loaded with ink or toner in each color. When the
printer places dots of the correct sizes next to and on top of each other on a page, your eye interprets
them as the intended color.
Implementations of the CMYK color space vary from printer to printer and from paper to paper. Because
the original color space of most images is an RGB color space, it is best to leave images in an RGB color
space so they retain their original characteristics. That way, your print server or printer has as much of
the original color information as possible when it converts the images to the most appropriate CMYK
color space for the printer and paper combination.
If you save an image by using the CMYK color space, make sure that you either save an ICC profile for
that color space or use a standard non-device specific CMYK color space like SWOP or Coated FOGRA27
and associate the appropriate ICC profile with the image.
Note: Both RGB and CMYK values can be expressed in different ways. For example, in the PostScript
DataStream, the values range from 0.0 to 1.0, while in some graphic arts programs they can be expressed
in hexadecimal numbers or as percentages.
An ICC profile contains information for converting an image between a device-specific color space and a
device-independent color space. A device-independent color space is a color space that does not depend
on or relate to the characteristics of any particular device, but rather contains all colors for all gamuts. The

12 IBM i: Advanced Function Presentation (AFP)


ICC identified a specific profile connection space (PCS) as the target device-independent color space for
all ICC profiles.
You can use an input ICC profile to translate color data that is created on one device (such as a digital
camera) into the PCS. Then, you can use an output ICC profile to convert from the PCS into the native
color space of a different device (such as a printer). Converting images from one color space to another is
process-intensive and can affect performance in your print system, although it is the best way to maintain
consistent color for the devices in your system.
For more information, see “ICC Profiles” on page 16.

Gamut and rendering intent


Every device has a gamut, a range of colors or shades of colors that it can display or print. Some devices
have larger gamuts than others; some devices have gamuts that are similar sizes, but that contain slightly
different colors. When an image is created on a device with a gamut that is different from the printer, you
can use a rendering intent to tell the printer how to adjust the colors that are outside the gamut of the
printer.
The gamut of a printer is almost always significantly smaller than the gamut of a monitor, digital camera,
or scanner. Images or graphics nearly always must be adjusted to print appropriately because some of the
colors that they require might be outside the gamut of the printer.
A rendering intent tells the printer how to adjust the image when it encounters colors that it cannot
reproduce. Each rendering intent has different benefits and trade-offs, so you can choose one based on
how the print output should look.
For more information, see “Rendering intents” on page 16.

Color mixing and calibration


Four standard colors (cyan, magenta, yellow, and black) are blended to create all the colors in the gamut
of a printer. A printer mixes colors by printing four layers of a page or an image, one in each color. If the
printer registration is not set correctly, the images do not line up properly and the colors appear wrong. In
addition, the printer must be calibrated to ensure that all its systems are functioning correctly and that it
is in a known good state.
By using the color information that is described in its color space, each device determines the amount of
cyan, magenta, yellow, or black to use. Dots of each color are printed in overlapping patterns that, when
interpreted by your eyes, blend the colors appropriately. To ensure that the colors are created accurately,
the color planes must be perfectly aligned. If they are not, you might see moire patterns, unintended
patterns in the printed images, or poorly blended colors, which are especially noticeable on the edges of
your images.
Color printers must be calibrated regularly, in some cases daily, to ensure that the colors they produce
are consistent. In addition, follow the recommended printhead maintenance procedures and schedule to
ensure that the printer operates optimally. Even when a printer is calibrated correctly, its gamut is much
smaller than the gamut of any monitor, so images do not look the same when they are printed as they do
when they are displayed on a monitor.

Halftones and tone transfer curves


Halftones are used to convert images (such as photographs, drawings, logos, or charts) from the
continuous tones that you see on a monitor into a pattern of dots that a printer can put on paper.
Tone transfer curves are used to modify the values of a particular color component and thus adjust the
appearance of some of the colors. For example, you can apply a tone transfer curve to emphasize the
brightest parts of an image.
Halftones and tone transfer curves are used with both color and grayscale images.
There are several different kinds of halftones, including clustered-dot, stochastic, and error diffusion. For
simplicity, this discussion covers only clustered-dot halftones.
Clustered-dot halftones are characterized by:
• Line screen frequency

Advanced Function Presentation (AFP) 13


Line screen frequency is a measure of the resolution of a halftone, expressed in lines per inch (lpi).
A low line screen frequency, such as 80 lpi, creates coarser images because they use larger halftone
dots. A high line screen frequency, such as 150 lpi, can produce higher quality images by using smaller
halftone dots.
• Halftone pattern
Halftone dots are printed in various shapes and patterns. For example, dots can generally be round,
elliptical, or square, and they can be arranged in slightly different orientations. The halftone pattern also
describes how the size of the dot is increased to cover a larger percentage of the total area and yield
darker colors. Different patterns might produce better results for some print jobs.
• Rotation
Lines of halftone dots do not run parallel with the top or side of the paper because that could cause
unintended patterns to emerge, resulting in lower quality output.
In addition, the dots for each of the four colors in a CMYK printer cannot all be printed at the same angle
because they would overlap incorrectly and the colors would not appear as intended. Instead, the lines
of dots are printed on the page at specific angles so your eye blends them appropriately.
For example, the black layer of an image might be printed so the lines of dots run across the page at a
45 degree angle to the top of the paper, while the cyan layer is printed so that its lines of dots are at a
105 degree angle to the top of the paper.
Tone transfer curves are most often used to offset the effects of dot gain. Dot gain is the tendency for
printed dots to be larger than intended, often because of the way ink reacts with paper. If the ink soaks
into the paper and spreads out, the resulting dot is much larger (and possibly much lighter in color) than
the printer intended it to be. Tone transfer curves can increase or reduce the amount of ink that is used in
proportion to the dot gain.

File size
Spooled files with color images in them can have a file size that is much larger than black and white
spooled files. The larger file size can lead to longer processing times and increased traffic on your
network.
Because color images must contain data about each layer of color, the file might contain three to four
times more information than a grayscale file and over 24 times more information than a black and white
file. In addition, ICC profiles are embedded in some file types (such as TIFF images). While ICC profiles by
themselves might not be large, they do increase the size of an image. If you have only one image that is
repeated throughout a spooled file, and if you construct your spooled file so the image is downloaded only
once, the embedded profile is of little concern.
However, if you use various different images, each with an embedded profile, or if you construct your
spooled file so that each image is downloaded every time that it appears, the embedded profiles can add
unnecessary volume to the print job. If you plan to use a wide variety of color images, create or save them
with the same color space so they all use the same ICC profile. You can also install color images in a
resource directory so they can be reused.

Grayscale printing concepts


With grayscale printing, you can reproduce color images as high-quality black and white images by using
many shades of gray to represent subtle variations in color and light. Printing solutions that produce
high-quality grayscale output use color printing concepts with a black and white printer that supports
them to achieve that effect.
Moving to grayscale printing might be a first step in a migration to full color printing. You can start to
create color spooled files and print them on an existing printer until you are ready to invest in color
printers. In addition, you can use a grayscale printer as a backup system for a full color printer.
Some color concepts are much less important in grayscale printing than they are in color printing:
• The gamut of a black and white printer is much smaller than the gamut of a color printer; essentially all
the colors in an image must be adjusted.

14 IBM i: Advanced Function Presentation (AFP)


• The rendering intent that you choose has little effect on the appearance of the image because the colors
are already being changed significantly.
• Page registration is less important. Because the printer uses only one color, you do not have to line up
the color planes to create the correct color.
• Paper characteristics have minimal effect on grayscale output; one output profile is usually adequate for
all types of paper.
Other color concepts are more essential to grayscale printing.

Color spaces and ICC profiles


The color space of a black and white printer is much smaller than the color space of a color printer. Even
so, printers that can print grayscale images have output ICC profiles, just like color printers. The ICC
profiles for black and white printers map colors from the profile connection space (PCS) to shades of gray.
Otherwise, the color conversion process is the same.
The spooled file should specify the appropriate input profile; if there is no input ICC profile, the printer
uses a reasonable default. The printer has its own default ICC profile that is installed and available; it
should be adequate for nearly all spooled files.

Halftones
Grayscale printers apply halftones to spooled files to print them; halftones enable the printer to produce
many shades of gray and high-quality images. Generally, the most important characteristic to consider
for halftones in grayscale printing is line screen frequency, expressed in lines per inch (lpi). Each printer
supports a set of line screen frequencies natively; when you specify the wanted line screen frequency in a
spooled file, the printer chooses the available line screen frequency that best matches it.

Tone transfer curves


Tone transfer curves are used in grayscale printing to adjust the amount of toner that is used at different
levels of gray, thus adjusting the appearance of images. You can use the appearance value of a tone
transfer curve in grayscale printing to indicate how much the tone transfer curve is to adjust the color
values. Some sample appearance values are:
• Dark
• Highlight Midtone
• Standard

Color Management
Images, graphics, and photographs often appear different depending on the monitor or the printer you
use. The colors that are printed by one printer might not match the colors that are printed on another
printer, even if they came from the same source. If it is important that colors stay consistent from camera,
scanner, or monitor to printer, you must use color management practices.
It is virtually impossible to accurately reproduce the colors that you see on your monitor on a printed
page. Because printers typically have smaller color gamuts than other devices, some of the colors must
always be adjusted when images are transformed for printing. With color management, you can control
the adjustments so they are less noticeable than they might be if you use the default settings of your
image creation software, print server, and printer.
Several factors play significant roles in color management, including ICC profiles, rendering intents, and
paper characteristics.

Advanced Function Presentation (AFP) 15


ICC Profiles
The International Color Consortium (ICC) is an organization that establishes open standards for color
management. These standards help products work together by identifying a device-independent color
space and defining the elements of an ICC profile.
The device-independent color space that the ICC defined is called the profile connection space (PCS). The
PCS is a color space large enough to include all the color gamuts of different input, display, and output
devices. An ICC profile contains methods that map the colors that a device can create or display to the
values of the corresponding colors in the PCS. The ICC profile can be used to convert an image from a
device-specific color space to the PCS, or from the PCS to a device-specific color space.
Product manufacturers create ICC profiles that you can use with their devices. For example, if you take a
photograph with a digital camera, you can associate the photograph with the ICC profile for your camera.
Then, when you want to print that photograph, the color management system converts the color data
from the camera into the PCS. The printer then uses its ICC profile to convert the photograph data from
the PCS into its color space, and prints the photograph as accurately as it can.
For more information about the ICC, ICC profiles, and the PCS, see the ICC website: International Color
Consortium (http://www.color.org).

Rendering intents
Rendering intents indicate what you want a printer to do with colors that are outside its gamut.
ICC profiles support these rendering intents:
• Perceptual
If an image includes any colors that are out-of-gamut for the printer, the printer adjusts all the colors
in the image, even the colors that are already in the gamut of the printer, so they are all in-gamut and
maintain their color relationships to each other. The result is an image that is visually pleasing, but is not
colorimetrically accurate. The perceptual rendering intent is useful for general reproduction of images,
particularly photographs.
• Saturation
If a spooled file includes colors that are out-of-gamut for the printer, the printer replaces the out-of-
gamut color with the nearest color in the gamut. It also adjusts the in-gamut colors so that they are
more vivid. Saturation is the least used rendering intent, but it is useful for business graphics, such as
images that contain charts or diagrams.
• Media-relative colorimetric
If a spooled file includes colors that are out-of-gamut for the printer, the printer substitutes the nearest
in-gamut color; in-gamut colors are not adjusted. Colors that are printed on papers with different media
white points might not match visually. The media white point is the color of the paper that the spooled
file is printed on. For example, if you print an image on white paper, on off-white paper, and on blue
paper by using the media-relative colorimetric rendering intent, the printer uses the same amount of ink
or toner for each one and the resulting color is technically the same. However, the images might seem
different because your eyes adjust to the color of the background and interpret the color differently. This
rendering intent is typically used for vector graphics.
• Absolute colorimetric
All colors are mapped by using the same method as the media-relative colorimetric rendering intent,
however, all colors are adjusted for the media white point. For example, if you print an image on white
paper, on off-white paper, and on blue paper by using the absolute colorimetric rendering intent, the
printer adjusts the ink or toner that is used for each one. The resulting color is technically not same, but
the images might look the same because of the way your eyes interpret them in relationship to the color
of the paper. The absolute colorimetric rendering intent is typically used for logos.

16 IBM i: Advanced Function Presentation (AFP)


Paper characteristics
The paper that you use has a significant impact on the colors that you see. Even if you use the same ICC
profile and the same printer, printing on a different paper can result in a very different color appearance.
Colors can change from paper to paper, particularly if you change from coated to uncoated paper or
from sheet-fed to continuous forms paper. The changes can be so noticeable that printer manufacturers
generally test and certify papers with certain characteristics for use with their printers. They also create
different ICC profiles for their printers that are based on paper characteristics. Some ICC profiles can be
used for groups of papers that have similar characteristics.
When you load paper, you set certain paper characteristics on the printer. When the printer chooses the
correct device-specific output profile to use, it takes the characteristics into consideration. The following
are some paper characteristics considered.
• Media brightness
The percentage of light that the paper reflects.
• Media color
The color of the paper.
• Media finish
The characteristics of the surface of the paper, such as: glossy, satin, or matte.
• Media weight
The basic weight of the paper.

AFP Color Management


You can use various ways to print color data with Advanced Function Presentation (AFP). However, to
implement an AFP color printing solution with full color management, you must use color management
resources (CMRs). In addition, it is recommended that you install all of your color images as data objects
and associate CMRs with them.
For more information about color management, see the descriptions of the different color management
objects.

Color management resources


Color management resources (CMRs) are the foundation of color management in AFP print systems. They
are AFP resources that provide all the color management information, such as ICC profiles and halftones,
that an AFP system needs to process a spooled file and maintain consistent color from one device to
another.
CMRs share some characteristics with other AFP resources, but are different in some important ways.
CMRs are similar to other AFP resources in these ways:
• CMRs can be associated with elements of a spooled file at various levels of the hierarchy. Normal
hierarchy rules apply, so CMRs specified at lower levels override the CMRs at a higher level. For
example, a CMR set on a data object overrides a default CMR set on a spooled file.
• CMRs can be included in a spooled file in an inline resource group and referenced in a form definition,
page environment, object environment, or an include Object (IOB) structured field.
Note: CMRs can vary in size from several hundred bytes to several megabytes. If your spooled file uses
relatively few CMRs, including them in the spooled file might not have an impact on the performance
of your system. However, if your spooled file uses more than 10 CMRs, the size of the spooled file can
increase so much that file transfer rates and network traffic are affected.
• CMRs are stored centrally in the integrated file system, so you do not need to include them in every
spooled file.
• For PSF to find CMRs, the paths that contain the CMRs must be specified in system environment
variable QIBM_AFP_CMR_PATH.
CMRs are different from other AFP resources in these ways:

Advanced Function Presentation (AFP) 17


• You cannot copy CMRs into a directory as you can other AFP resources. To store CMRs in a directory, you
must install them using an application such as AFP Resource Installer. For more information about the
AFP Resource Installer, see “AFP Resource Installer” on page 28.
• CMRs and data objects must be stored in directories that have resource access tables (RATs). AFP
Resource Installer creates the RAT when CMRs and data objects are installed. It is recommended that
CMRs and data objects be installed in separate directories.
• CMR names are created when you install the CMR by using AFP Resource Installer and are UTF-16BE
(CCSID 1200) encoded.
Related tasks
Search order of library list
Print Services Facility (PSF) uses the user library list and device library list to search for the AFP resources
that you specify.

Color management resource types


Different situations call for different types of Color management resources (CMRs). Some CMRs are
created by product manufacturers so you can download and use them, while others are created by your
printer or other color management software. If you have the appropriate information, you can also create
CMRs yourself.
Some CMRs are used to interpret input files (similar to the function performed by ICC input profiles),
while others are used to prepare the final spooled file output for a specific printer (similar to the function
performed by ICC output profiles). The following topics discuss the different types of CMRs.

Color conversion CMR


Color conversion CMRs are used to convert colors to and from the ICC Profile Connection Space (PCS), a
device-independent color space. You can use them to prepare images for color or grayscale printing.
Color conversion CMRs are an essential element of any AFP color management system because they
are ICC profiles encapsulated in AFP structures. The AFP structures add information that your color
management system can use, but it leaves the ICC profile unaltered.
You can use color conversion CMRs to produce consistent colors on different devices. In a color system,
they help ensure that the colors on your monitor are as close as possible to the colors that are printed. If
you move the spooled file to a different printer, the colors are adjusted again to match the new printer.
In a grayscale system, color conversion CMRs map colors to appropriate shades of gray to produce
high-quality black and white images.
Pass-through CMRs are color conversion CMRs that indicate that no color processing is done if the color
space of the presentation device is the same as the color space of the CMR. Pass-through CMRs contain
no data.
Related concepts
Instruction processing mode
CMRs with the instruction processing mode refer to processing that is done to prepare the resource for a
specific printer, which uses a certain paper or another device. Generally, instruction CMRs refer to output
data and are similar to ICC output profiles.

Link color conversion CMR


Link color conversion CMRs combine the processing information that is required to directly convert an
image from the color space of an input device to the color space of the output device. Essentially, link
color conversion CMRs replace a pair of color conversion CMRs.
Converting color images to and from the ICC Profile Connection Space (PCS) takes a significant amount of
processing resources, in part because the process includes two conversions. Link color conversion CMRs
combine the two conversions and make them more efficient. The printer can use the link color conversion
CMR to convert colors directly from the color space of the input device to the color space of the output
device with the same color fidelity they would have if the printer did both of the conversions. As a result,
link color conversion CMRs can improve system performance.
The following are the two types of link color conversion CMRs:

18 IBM i: Advanced Function Presentation (AFP)


• Link CMRs
Link CMRs are unique. You cannot create a link CMR yourself and you do not include references to link
CMRs in your spooled files. The print system creates and uses link CMRs automatically.
If you use the AFP Resource Installer, link CMRs are generated automatically when you create or
install a color conversion CMR. As a result, your resource directory always contains link CMRs for every
combination of color conversion CMRs in audit (input) and instruction (output) processing modes. When
link CMRs are created, AFP Resource Installer marks them as capturable, so the printer can save them
to be used in other spooled files.
If you do not use the AFP Resource Installer, your printer might create link CMRs when it processes
spooled files. For example, if you send a spooled file to a printer that does create link CMRs, the printer
controller looks at the audit color conversion CMRs that are specified. Then, the print controller looks
at the link CMRs that it has available to find one that combines the audit color conversion CMR with the
appropriate instruction color conversion CMR. If it does not find one, the print controller creates the link
CMR and uses it. The print controller might save the link CMRs that it creates, but they can be removed
during normal operation; for example, if the printer runs out of storage or is shut down. If the link is
removed, the printer must create a new link CMR the next time it is needed.
When a link CMR is created, the print system evaluates the conversion algorithms to and from the PCS.
The system then combines the algorithms, so a data object can be converted directly from one color
space to the other without actually being converted to the PCS.
• Device link CMRs
Device link CMRs use an ICC device link profile to convert directly from an input color space to an output
color space without reference to an audit-mode or instruction-mode CMR. An ICC device link profile is a
special kind of ICC profile that is used to convert the input device color space to the color space of an
output or display device. ICC device link profiles are not embedded in images.
You can create, install, and uninstall device link CMRs yourself. Device link CMRs are referenced in
the MO:DCA DataStream and take precedence over audit color conversion CMRs. A device link CMR
specifies its own rendering intent, which is indicated in the header of the ICC device link profile. This
rendering intent overrides any other rendering intent that is active.
The biggest advantage of using device link CMRs is that they preserve the black channel (K component)
of the input color space when converting from CMYK to CMYK.
Related concepts
Audit processing mode
CMRs with the audit processing mode refer to processing that was applied to a resource. In most cases,
audit CMRs describe input data and are similar to ICC input profiles.
Instruction processing mode
CMRs with the instruction processing mode refer to processing that is done to prepare the resource for a
specific printer, which uses a certain paper or another device. Generally, instruction CMRs refer to output
data and are similar to ICC output profiles.
Link processing mode
CMRs with the link processing mode are used to link an input color space in the presentation data
(sometimes defined by an audit CMR) to the output color space of the presentation device (sometimes
defined by an instruction CMR). Only link and device link CMRs can be used in link processing mode.

Halftone CMR
Halftone CMRs carry the information that a printer uses to convert spooled files into a pattern of dots that
it can put on paper. Halftone CMRs can be used with both color and grayscale spooled files.
Halftone CMRs generally specify the line screen frequency, halftone pattern, and rotation of the halftone
that they carry. Device-specific halftone CMRs might also include the printer resolution.
A printer that uses AFP color management to print color or grayscale spooled files must use a halftone
CMR to convert the spooled file into a format that the printer can reproduce in ink or toner. If a halftone
CMR is not specified in the spooled file, the printer applies a default halftone CMR.

Advanced Function Presentation (AFP) 19


Note: Some printers have halftones that are applied by the print engine. As a result, the printer ignores
halftone CMR requests.
You can associate device-specific halftone CMRs or generic halftone CMRs with spooled files:
• If you know which printer is printing the spooled file, you can associate a device-specific halftone CMR
with the spooled file (or with AFP resources inside the spooled file). The printer uses the halftone CMR
that you specify.
• If you do not know which printer is printing the spooled file, but you want to ensure that it uses
a halftone CMR that has certain characteristics, such as a specific line screen frequency, you can
associate a generic halftone CMR with the spooled file.
Because it is difficult to know which halftone CMRs would be the best ones to use for the current
conditions on the current printer, it is recommended that you specify halftone CMRs generically. The
printer can then choose the most appropriate CMR that it has available.
Related concepts
Generic halftone CMRs
You can use generic halftone CMRs when you want to choose one or more characteristics of the halftone
CMR for a spooled file, but you do not know exactly which halftone CMRs are available.
Tone transfer curve CMR
Tone transfer curve CMRs are used to carry tone transfer curve information for an AFP spooled file. A
tone transfer curve CMR is used to modify the values of a particular color component and adjust the
appearance of some of the colors by increasing or decreasing the amount of ink that is used to emphasize
or reduce the effects of dot gain on the final output.
Instruction processing mode
CMRs with the instruction processing mode refer to processing that is done to prepare the resource for a
specific printer, which uses a certain paper or another device. Generally, instruction CMRs refer to output
data and are similar to ICC output profiles.

Generic halftone CMRs


You can use generic halftone CMRs when you want to choose one or more characteristics of the halftone
CMR for a spooled file, but you do not know exactly which halftone CMRs are available.
When a spooled file specifies a generic halftone CMR, the print server looks in the resource directory for
halftone CMRs that match the printer device type and model. If the print server finds an appropriate CMR,
it sends the device-specific halftone CMR to the printer with the spooled file. If the print server does not
find an appropriate halftone CMR, it sends the generic halftone CMR to the printer.
If a spooled file arrives at the printer that is requesting a generic halftone CMR, the printer compares the
requested characteristics with the available device-specific halftone CMRs. If there is a match, the printer
uses the selected device-specific halftone CMR when it processes the spooled file. If there is no match,
the printer uses the halftone CMR whose line screen frequency value is closest to the one requested.
The Color Management Object Content Architecture (CMOCA) defines several generic halftone CMRs,
which cover the most common line screen frequencies and halftone types. A print server that supports
CMOCA can interpret generic halftone CMRs if it has device-specific halftone CMRs available to it in a
resource directory. If you use AFP Resource Installer, the generic halftone CMRs are installed in every
resource library directory that you create and populate by using AFP Resource Installer.
The following topics contain information about the different types of generic halftone CMRs.
Related concepts
Halftone CMR

20 IBM i: Advanced Function Presentation (AFP)


Halftone CMRs carry the information that a printer uses to convert spooled files into a pattern of dots that
it can put on paper. Halftone CMRs can be used with both color and grayscale spooled files.

Indexed CMR
Indexed (IX) CMRs map indexed colors in the data to presentation device colors or colorant combinations.
Indexed CMRs provide rules about how to render indexed colors. Indexed CMRs apply to indexed colors
that are specified by using the highlight color space. They do not apply to indexed colors found within
PostScript or other non-IPDS data objects. For Indexed CMRs, both instruction and audit processing
modes are valid. However, only indexed CMRs with an instruction processing mode are used; CMRs
with an audit processing mode are ignored. The tags in the indexed CMR allow the CMR to use various
color spaces in the descriptions. These color spaces can be grayscale, named colorants, RGB, CMYK, or
CIELAB.

Tone transfer curve CMR


Tone transfer curve CMRs are used to carry tone transfer curve information for an AFP spooled file. A
tone transfer curve CMR is used to modify the values of a particular color component and adjust the
appearance of some of the colors by increasing or decreasing the amount of ink that is used to emphasize
or reduce the effects of dot gain on the final output.
Like halftone CMRs, tone transfer curve CMRs are associated with spooled files specifically or generically.
If they are specified generically, the print server looks in the resource directory for tone transfer curve
CMRs that match the printer device type and model. If the print server finds an appropriate CMR, it sends
the device-specific tone transfer curve CMR to the printer with the spooled file. If the print server does not
find an appropriate tone transfer curve CMR, it sends the generic tone transfer curve CMR to the printer.
If a spooled file arrives at the printer that is requesting a generic tone transfer curve CMR, the printer
compares the requested characteristics with the device-specific tone transfer curve CMRs that it has
available. If there is a match, the print server or printer uses the selected device-specific tone transfer
curve CMR when it processes the spooled file. If the printer cannot find a good match for the generic tone
transfer curve CMR, it ignores the request and uses its default tone transfer curve CMR.
The Color Management Object Content Architecture (CMOCA) defines several generic tone transfer curve
CMRs with different appearance values. The appearance values can be used to specify the dot gain the
printer uses when your spooled file is printed.
Generic tone transfer curves can be used to select these appearance values:
• Dark
The output is adjusted to show a dot gain of 33% for a 50% dot.
• Accutone
The output is adjusted to show a dot gain of 22% for a 50% dot.
• Highlight Midtone
The output is adjusted to show a dot gain of 14% for a 50% dot. This appearance might be used to
emphasize the brightest part of an image.
• Standard
The output is adjusted enough to account for the effects of dot gain, effectively counteracting the dot
gain.
If you use AFP Resource Installer, it installs the generic tone transfer curve CMRs on your system
automatically.
Related concepts
Halftone CMR
Halftone CMRs carry the information that a printer uses to convert spooled files into a pattern of dots that
it can put on paper. Halftone CMRs can be used with both color and grayscale spooled files.
Instruction processing mode

Advanced Function Presentation (AFP) 21


CMRs with the instruction processing mode refer to processing that is done to prepare the resource for a
specific printer, which uses a certain paper or another device. Generally, instruction CMRs refer to output
data and are similar to ICC output profiles.

CMR processing modes


CMR processing modes tell the print system how to apply a CMR to the print data it is associated with. You
specify a CMR processing mode whenever you specify a CMR, although not all modes are valid for all CMR
types.
The following topics contain information about the different CMR processing modes.

Audit processing mode


CMRs with the audit processing mode refer to processing that was applied to a resource. In most cases,
audit CMRs describe input data and are similar to ICC input profiles.
The audit processing mode is used primarily with color conversion CMRs. In audit processing mode, the
CMRs indicate which ICC profile must be applied to convert the data into the Profile Connection Space
(PCS).
For example, to take a photograph with a digital camera and then include the photograph in an AFP
spooled file, you can use AFP Resource Installer to:
1. Create a color conversion CMR from the ICC profile of your camera.
2. Install your photograph in a resource directory.
3. Associate the color conversion CMR with the data object, indicating the audit processing mode.
Then, you create a spooled file that includes the data object. When the spooled file is processed, the
system uses the color conversion CMR to convert the colors in the image into the PCS. The colors can then
be converted into the color space of the printer that is printing it.
Related concepts
Link color conversion CMR
Link color conversion CMRs combine the processing information that is required to directly convert an
image from the color space of an input device to the color space of the output device. Essentially, link
color conversion CMRs replace a pair of color conversion CMRs.
Instruction processing mode
CMRs with the instruction processing mode refer to processing that is done to prepare the resource for a
specific printer, which uses a certain paper or another device. Generally, instruction CMRs refer to output
data and are similar to ICC output profiles.
Link processing mode
CMRs with the link processing mode are used to link an input color space in the presentation data
(sometimes defined by an audit CMR) to the output color space of the presentation device (sometimes
defined by an instruction CMR). Only link and device link CMRs can be used in link processing mode.

Instruction processing mode


CMRs with the instruction processing mode refer to processing that is done to prepare the resource for a
specific printer, which uses a certain paper or another device. Generally, instruction CMRs refer to output
data and are similar to ICC output profiles.
The instruction processing mode is used with color conversion, tone transfer curve, and halftone CMRs.
In instruction processing mode, the CMRs indicate how the system must convert a resource so it prints
correctly on the target printer. The manufacturer of your printer might provide ICC profiles or CMRs that
you can use. Those ICC profiles and CMRs might be installed in the printer controller, included with the
printer on a CD, or available for download from the manufacturer's website.
If you send a color AFP spooled file to a printer that supports AFP Color Management, color conversion
and tone transfer curve CMRs in instruction processing mode can be associated with the spooled file.
When the printer processes the spooled file, it applies the CMRs in this order:
1. Color conversion CMRs in audit processing mode to convert the resources into the ICC Profile
Connection Space (PCS)

22 IBM i: Advanced Function Presentation (AFP)


2. Color conversion and tone transfer curve CMRs in instruction processing mode to convert the
resources into the color space of the printer
3. Halftone CMR in instruction processing mode to convert the job pages from their digital format into the
pattern of dots that the printer can produce
In some cases, CMRs that are often used as instruction CMRs can be used as audit CMRs. For example,
if you send a large spooled file to a high-speed printer, the images in the spooled file are converted into
the color space of that printer by using a color conversion CMR with the instruction processing mode.
However, if you must reprint part of the spooled file on a different printer, the system must convert the
spooled file into the color space of the second printer. In that case, the color conversion CMR of the first
printer is used in the audit processing mode to move the images back into the PCS. Then, the system
uses a color conversion CMR of the second printer in instruction mode to convert the images into its color
space.
Related concepts
Link color conversion CMR
Link color conversion CMRs combine the processing information that is required to directly convert an
image from the color space of an input device to the color space of the output device. Essentially, link
color conversion CMRs replace a pair of color conversion CMRs.
Color conversion CMR
Color conversion CMRs are used to convert colors to and from the ICC Profile Connection Space (PCS), a
device-independent color space. You can use them to prepare images for color or grayscale printing.
Tone transfer curve CMR
Tone transfer curve CMRs are used to carry tone transfer curve information for an AFP spooled file. A
tone transfer curve CMR is used to modify the values of a particular color component and adjust the
appearance of some of the colors by increasing or decreasing the amount of ink that is used to emphasize
or reduce the effects of dot gain on the final output.
Halftone CMR
Halftone CMRs carry the information that a printer uses to convert spooled files into a pattern of dots that
it can put on paper. Halftone CMRs can be used with both color and grayscale spooled files.
Audit processing mode
CMRs with the audit processing mode refer to processing that was applied to a resource. In most cases,
audit CMRs describe input data and are similar to ICC input profiles.
Link processing mode
CMRs with the link processing mode are used to link an input color space in the presentation data
(sometimes defined by an audit CMR) to the output color space of the presentation device (sometimes
defined by an instruction CMR). Only link and device link CMRs can be used in link processing mode.

Link processing mode


CMRs with the link processing mode are used to link an input color space in the presentation data
(sometimes defined by an audit CMR) to the output color space of the presentation device (sometimes
defined by an instruction CMR). Only link and device link CMRs can be used in link processing mode.
Whenever you install or uninstall audit or instruction color conversion CMRs in your resource directory
by using AFP Resource Installer or a similar software product, the AFP Resource Installer automatically
creates or deletes link CMRs for every combination of audit and instruction color conversion CMR.
When a spooled file calls for an audit-instruction combination, the print server checks the resource
directory for a link CMR for that combination. If the print server finds an appropriate link CMR, it sends
the CMR to the printer with the spooled file. Your printer can use the link CMRs whenever a spooled file
indicates that it uses a particular combination of audit and instruction CMRs.
If you do not use AFP Resource Installer or a similar program to install your resources, your color printer
must either create link CMRs while it processes your spooled files or convert the colors in your spooled
files twice. The first conversion is from the original color space to the PCS and the second is from the PCS
to the color space of the printer.

Advanced Function Presentation (AFP) 23


Related concepts
Audit processing mode
CMRs with the audit processing mode refer to processing that was applied to a resource. In most cases,
audit CMRs describe input data and are similar to ICC input profiles.
Instruction processing mode
CMRs with the instruction processing mode refer to processing that is done to prepare the resource for a
specific printer, which uses a certain paper or another device. Generally, instruction CMRs refer to output
data and are similar to ICC output profiles.
Link color conversion CMR
Link color conversion CMRs combine the processing information that is required to directly convert an
image from the color space of an input device to the color space of the output device. Essentially, link
color conversion CMRs replace a pair of color conversion CMRs.

CMR creation and installation


Device manufacturers and groups that support AFP color standards create CMRs that you can use in your
color printing systems. You can also create CMRs yourself, based on your needs.
The AFP Consortium, the group that defined the AFP Color Management Object Content Architecture
(CMOCA), identified a set of color conversion CMRs that are most often used in audit processing mode.
The set includes color conversion CMRs for common color spaces, such as:
• Adobe RGB (1998)
• sRGB
• SMPTE-C RGB
• SWOP CMYK
The standard CMRs are included with AFP Resource Installer, although they are not installed by default.
You can install the standard CMRs that you plan to use. In addition, AFP Resource Installer automatically
installs all the generic halftone and tone transfer curve CMRs in any resource directory you create.
Print vendors might have device-specific CMRs that can be downloaded from the company’s website.
If you need more CMRs, you can create them using wizards that are provided in AFP Resource Installer.
See online help for details about the wizard.
If you use AFP Resource Installer to create a CMR, the software automatically installs the CMR in a
resource directory. You can also use AFP Resource Installer to install CMRs that you get from your printer
manufacturer.

Data objects
Presentation data objects contain a single type of data (such as GIF, JPEG, PNG, and TIFF images) and
can be used in your spooled files. These data objects can be placed directly in a page or overlay or can be
defined as resources and included in pages or overlays. Using a data object as a resource is more efficient
when that object is used more than once in a spooled file. Resources are downloaded to the printer once
and referenced as needed.
Data objects can either be included inline with a spooled file or installed in a resource directory by using
software such as AFP Resource Installer. If you install your data objects in a resource directory, you
can associate color conversion CMRs with them. For more information about resource directories, see
“Resource directory management” on page 26.
Related concepts
DDS AFPRSC keyword

Types of data objects


Image data objects can be stored in a number of different formats, including AFPC JPEG Subset, EPS, GIF,
IOCA, PDF, PNG, and TIFF. These image types are device-independent so they can be used by different
systems and still be interpreted consistently.
• AFPC JPEG Subset (JPEG)

24 IBM i: Advanced Function Presentation (AFP)


AFPC (AFP Consortium) JPEG Subset files, formerly called JPEG File Interchange Format (JFIF)
files, are bitmap image files that are compressed by using Joint Photographic Experts Group (JPEG)
compression. As a result, AFPC JPEG Subset files are most commonly referred to as JPEG files.
JPEG files most commonly use the file extension .jpg, but can also use .jpeg, .jpe, .jfif, and .jif. JPEG
compression deletes information that it considers unnecessary from images when it converts them.
JPEG files vary from having small amounts of compression to having large amounts of compression. The
more an image is compressed, the more information is lost. If the image is compressed only once, there
usually is no noticeable effect on the image. However, if the image is compressed and decompressed
repeatedly, the effects of deleting information become more noticeable.
JPEG compression is commonly used for photographs, especially photographs that are transmitted
or displayed on web pages. The compression makes the files small enough to transmit on a network
efficiently, but leaves enough information that the image is still visually appealing.
• Encapsulated PostScript (EPS)
EPS is a PostScript graphics file format that follows conventions that Adobe Systems defined. EPS files
support embedded ICC profiles.
• Graphics Interchange Format (GIF)
GIF files are bitmap image files that are limited to a palette of 256 RGB colors. Because of the limited
color range that it can contain, GIF is not a good format for reproducing photographs, but it is generally
adequate for logos or charts. GIF images are widely used on the internet because they are usually
smaller than other image formats. GIF files use the file extension .gif.
• Image Object Content Architecture (IOCA)
IOCA is an architecture that provides a consistent way to represent images, including conventions and
directions for processing and exchanging image information. The architecture defines image information
independently of all data objects and environments in which it might exist and uses self-identifying
terms; each field contains a description of itself along with its contents.
• Portable Document Format (PDF)
PDF is a standard file format that Adobe Systems developed. PDF files can be used and stored on
various operating systems and contain all the required image and font data. Design attributes in a PDF
are kept in a single compressed package.
Note: Single-page and multiple-page PDF files can be used as data objects in AFP spooled files.
• Portable Network Graphics (PNG)
PNG files are bitmap image files that support indexed colors, palette-based images with 24-bit RGB
or 32-bit RGBA colors, grayscale images, an optional alpha channel, and lossless compression. PNG
is used for transferring images on the internet, but not for print graphics. PNG files use the file
extension .png.
• Tagged Image File Format (TIFF)
TIFF files are bitmap image files that include headers to provide more information about the image.
TIFF files use the file extensions .tif or .tiff. TIFF files support embedded ICC profiles. If an ICC profile
is embedded in a file, the characteristics of the input color space are known whenever the file is used;
however, the profiles increase the file size. When you save a file in the TIFF format, you can use various
compression algorithms.
Note: Single-image and multiple-image TIFF files can be used as data objects in AFP spooled files.
Not all printers support all types of data objects.
The embedded ICC profiles in EPS, JPEG, and TIFF files contain the information that a printer uses to
convert colors in the image from an input color space into the Profile Connection Space (PCS). The input
color space might be an industry-standard space or it can describe the color reproduction capabilities of a
device, such as a scanner, digital camera, monitor, or printer.

Advanced Function Presentation (AFP) 25


Data object creation and installation
You can use a wide variety of software applications to create or manipulate images to include in spooled
files. If you want to store them in central resource repositories, you can use AFP Resource Installer to
install them.
The following topics contain information on how to create and install data objects.

Data object creation


Most types of data objects are images of some kind. They might be photographs that were taken with a
digital camera, charts or diagrams that were generated by a software tool, or digital drawings that were
created by using graphics software. Regardless of how images are created, you generally must manipulate
them to include them in spooled files.
The following changes might be needed:
• Convert the image into a file type that is appropriate for printing. For example, the file types that many
graphics applications (such as Adobe Illustrator, CorelDRAW, and Corel Paint Shop Pro) use to store
images while you work on them are not appropriate for printing. To use images that you create by using
any of those programs, you can save or export those files as a different file type, such as EPS, JPEG, or
TIFF.
• Make sure that your image files are associated with an appropriate color space or input profile. Follow
the instructions that are provided with your graphics software to set up color management, including
installing and using ICC profiles for digital cameras and monitors, and customizing color management
settings. The instructions should also explain how to change the color profile that an image uses and
how to save an image with an embedded profile.
• See “Tips and best practices” on page 27 for tips on creating images and managing them as data
object resources.
Related concepts
Tips and best practices
The following general guidelines about creating and managing images and other color resources can
improve the performance of your AFP color printing system.

Data object installation


You can use AFP Resource Installer to install your images in a resource directory. AFP Resource Installer
includes wizards that can guide you through the process of installing an image as a data object.
When you install an EPS, JPEG, or TIFF image with an embedded ICC profile by using AFP Resource
Installer, you can choose how you want to handle the profile:
• Leave the profile in the file without creating a CMR.
• Leave the profile in the file, but also copy the profile and create a CMR from the copy. Associate the new
CMR with the data object.
• Remove the profile from the file (to reduce the file size) and make the profile into a CMR. Associate the
new CMR with the data object.
For more information about the AFP Resource Installer, see “AFP Resource Installer” on page 28.

Resource directory management


If you store CMRs and data objects in central resource directories, you must understand some of the
characteristics of resource directories to make sure that your resources are available when and where you
need them.
Resource directories that AFP Resource Installer creates use a resource access table (RAT) as the index
of the resource directory. The index is stored as a file in the directory that it refers to. You must store
CMRs in resource directories that use a RAT. It is recommended that you store data objects in resource
directories that use a RAT as well.
When you use AFP Resource Installer to create a resource directory, it creates a RAT and stores it in the
directory. When you install a CMR or data object, AFP Resource Installer updates the RAT with information

26 IBM i: Advanced Function Presentation (AFP)


about the resource. When a print server looks in a resource directory for a resource, it first looks in the
RAT to see whether the resource is listed.
The print server relies on the RAT; if it is incorrect, the print server cannot find resources in the resource
directory. As a result, you must always use AFP Resource Installer to manage your resource directories,
including to take the following actions:
• Add CMRs and data objects to a resource directory. Do not copy CMRs or data objects directly into
the resource directories that AFP Resource Installer uses. If you copy CMRs or data objects into these
resource directories, the RAT is not updated so the print server cannot use it to find the CMRs or data
objects.
• Modify properties of data objects and CMRs listed in the RAT. Do not directly edit the RAT or any of
the files in a resource directory. Do not replace an existing version of a CMR or data object with a new
version by copying the new version directly into the resource directory; use AFP Resource Installer to
update the resource.
• Install CMRs or data objects in a different resource directory or replicate a resource directory in a
different location.
Do not copy CMRs or data objects from a resource directory and store them in another location.
For more information about completing these tasks, see the AFP Resource Installer help.

Tips and best practices


The following general guidelines about creating and managing images and other color resources can
improve the performance of your AFP color printing system.
Related concepts
Data object creation
Most types of data objects are images of some kind. They might be photographs that were taken with a
digital camera, charts or diagrams that were generated by a software tool, or digital drawings that were
created by using graphics software. Regardless of how images are created, you generally must manipulate
them to include them in spooled files.

Tips for images


To optimize the performance of your AFP color printing system, it is recommended that you follow some
guidelines for creating and including images in spooled files.
When you want to use color images in your spooled files:
• Get the original electronic versions of images instead of scanning existing documents. Almost
unnoticeable specks of color in the background of images that were scanned can greatly increase the
size of the image. If you must scan an image, use an image-editing tool to clean up the background as
much as possible.
• Save all images in the same standard color space so you need only one input profile for all of them.
Adobe RGB (1998) is the recommended color space for images that are to be printed.
• Flatten multi-layer images (such as the ones you can create in graphics tools like Adobe Illustrator and
Corel Paint Shop Pro) before you include them in spooled files. Unflattened images are large and more
difficult to work with. Save a copy of the original image for future editing, but flatten the version that you
include in your spooled file.

Tips for resources


To optimize the performance of your AFP color printing system, it is recommended that you follow some
guidelines for managing color resources.
You can use AFP Resource Installer to provide the following functions:
• Install all the CMRs for your printer in a resource directory.
• Install the data objects that you use frequently in a resource directory.
• Mark the CMRs and data objects that are reused regularly as non-private, capturable resources so they
can be saved on the printer and used for other spooled files without being downloaded every time.

Advanced Function Presentation (AFP) 27


Note: This option is not advisable for secure resources, such as signature files.
• Associate audit color conversion CMRs with data objects that require color management, so the
embedded profiles can be removed from the image files.

AFP Resource Installer


AFP Resource Installer is a key element of an AFP color management system when resources are stored
in central resource directories. You can use it to create, install, and manage color management resources
(CMRs) and data objects for use in your system.
AFP Resource Installer is a Java application that you install on a Windows workstation. You can use it to
install and work with fonts in addition to CMRs and data objects.
You can use AFP Resource Installer to:
• Create CMRs from existing data, including ICC profiles.
You can use a wizard to guide you through the process.
• Install CMRs, fonts, and data objects in resource directories on the local system or on any system that
you can access with FTP.
• Associate CMRs with data objects, so data objects can be reproduced accurately on different printers.
In some cases, you can reduce the file size of your images by removing the embedded color profile from
the file and using an associated CMR.
• Mark resources as capturable.
Capturable resources can be captured and saved in the printer for use with other spooled files,
which can help improve system performance. The print server queries the printer before it sends any
resources; if the printer already has the resource, the print server does not need to send it.
• Mark resources as private.
Private resources cannot be captured in the printer and must be downloaded with every spooled file
that uses them. For example, you can mark signature files that are used for company checks as private
for security reasons.
When you use AFP Resource Installer to install a color conversion CMR, the software automatically
creates link (LK) CMRs between the new color conversion CMR and the existing color conversion CMRs.
When a spooled file references the new CMR, the print server automatically downloads the link CMRs that
match the target device type and model and sends them to the printer with the spooled file. If one of
those link CMRs is appropriate, the printer can use it instead of having to spend extra time to create a link
CMR.
Note: In order for PSF to use resources installed by AFP Resource Installer, you must add the resource
directory path to the appropriate system-level environment variable:
• For CMRs, use QIBM_AFP_CMR_PATH.
• For data object resources, use QIBM_AFP_RESOURCES_PATH.
For more information about the AFP Resource Installer, see AFP Resource Installer
(http://www.infoprintsolutionscompany.com/internet/ipww.nsf/vwwebpublished/swtp_afp-resource-
installer_en).

TrueType and OpenType fonts


There is extensive operating system support for TrueType fonts, and they are popular with PC
applications. Consequentially, TrueType is probably the most prevalent font technology in the industry
today. OpenType is an extension of the TrueType font format.
The OpenType font format allows better support for international character sets and provides broader
multiplatform support. The OpenType format allows both TrueType or Adobe Type 1 outline fonts to be
packaged as a TrueType font. OpenType fully supports Unicode. Advanced Function Presentation data
stream (AFPDS) accepts Unicode UTF-8 or UTF-16.

28 IBM i: Advanced Function Presentation (AFP)


Related concepts
AFP fonts
A font is a collection of characters of a certain size, typeface, and type style. Advanced Function
Presentation (AFP) fonts, also called Font Object Content Architecture (FOCA) fonts, are the standard
fonts used for Intelligent Printer Data Stream (IPDS) output. AFP fonts are made up of a code page and
a character set. All AFP fonts are encoded as either single-byte or double-byte fonts, depending on the
language for which they are being used.
Obtaining AFP resources
There are many sources of Advanced Function Presentation (AFP) resources.
Specifying a TrueType or OpenType font
You can specify a TrueType font anywhere that you can specify an Advanced Function Presentation (AFP)
font. You can also mix references to TrueType and AFP fonts. However, TrueType fonts are referenced
differently than AFP fonts.
Purchasing fonts
IBM offers several different font products that you can purchase, depending on your needs.

Resource access tables


When you install a TrueType font with the AFP Resource Installer from Ricoh, the installer creates a
resource access table (RAT). This table has a hard-coded name and is used to find fonts on your system.
For more information about the AFP Resource Installer, see AFP Resource Installer
(http://www.infoprintsolutionscompany.com/internet/ipww.nsf/vwwebpublished/swtp_afp-resource-
installer_en).

How TrueType and OpenType fonts differ from AFP fonts


When using TrueType fonts, you will see differences in how the fonts are specified, managed, and
installed when compared to Advanced Function Presentation (AFP) fonts.
Note: In this topic, the term TrueType refers to both TrueType and OpenType fonts.

Table 1. Differences between AFP and TrueType or OpenType fonts


AFP fonts TrueType fonts
AFP fonts are IBM i objects. TrueType fonts are stream files in the integrated file
system.
DDS keyword FNTCHRSET is used to select AFP fonts. DDS keyword FONTNAME is used to select TrueType
fonts.

Advanced Function Presentation (AFP) 29


Table 1. Differences between AFP and TrueType or OpenType fonts (continued)
AFP fonts TrueType fonts
Print Services Facility (PSF) uses a defined search TrueType fonts reside in one or more of the following
algorithm to search for AFP fonts. It searches the locations.
library list that is associated with the job for a
• The directories that are specified in
matching font.
the QIBM_FONT_RESOURCES_PATH environment
variable.
• /QIBM/UserData/OS400/Fonts/TTFonts. This
directory contains user fonts.
• /QIBM/ProdData/OS400/Fonts/TTFonts. This
directory contains IBM-supplied fonts.
You can specify additional directories for
user fonts by using environment variable
QIBM_FONT_RESOURCES_PATH. One or more
directories, which are separated by a colon, can be
specified.
When searching for fonts, the system looks
to see whether there are any paths
that are set in the environment variable
QIBM_FONT_RESOURCES_PATH. If so, those paths
are searched first. Then the UserData path is
searched, followed by the ProdData path.

AFP fonts are created and managed using the TrueType fonts have no IBM i management
font resource commands: CHGCDEFNT, CHGFNTRSC, commands. Instead, the fonts are installed using the
CRTFNTRSC, DLTFNTRSC, DSPCDEFNT, DSPFNTRSCA, “AFP Resource Installer” on page 28. The generated
and WRKFNTRSC. resource access table resides in the /QIBM file
system.
An AFP font is specified by using the *FNTRSC object TrueType fonts are specified using a font name such as
name such as C0D0GT10. Times New Roman.
AFP fonts can be substituted when the requested font There is no font substitution with TrueType fonts.
is not available.
An AFP font is marked as eligible for capture with the TrueType fonts are marked as eligible for capture by
Change Font Resource (CHGFNTRSC) command. the “AFP Resource Installer” on page 28.
PSF tries to capture AFP fonts only if the PSF PSF always tries to capture TrueType fonts.
configuration object specifies FNTCAPTURE(*YES).

Related concepts
AFP fonts
A font is a collection of characters of a certain size, typeface, and type style. Advanced Function
Presentation (AFP) fonts, also called Font Object Content Architecture (FOCA) fonts, are the standard
fonts used for Intelligent Printer Data Stream (IPDS) output. AFP fonts are made up of a code page and
a character set. All AFP fonts are encoded as either single-byte or double-byte fonts, depending on the
language for which they are being used.
Specifying a TrueType or OpenType font
You can specify a TrueType font anywhere that you can specify an Advanced Function Presentation (AFP)
font. You can also mix references to TrueType and AFP fonts. However, TrueType fonts are referenced
differently than AFP fonts.
Related reference
Specifying an AFP font

30 IBM i: Advanced Function Presentation (AFP)


There are many different tools you can use to specify Advanced Function Presentation (AFP) fonts in your
document. Each tool has different capabilities.

Resource libraries
Advanced Function Presentation (AFP) resource libraries group resources of the same type.
For example, a page segment library might contain images of the company logo in several different sizes.

Resource library lists


A resource library list specifies the libraries that are searched for the Advanced Function Presentation
(AFP) resources needed to process a spooled file.
There are two types of resource library lists: user and device.
User resource library list
Specifies what user libraries are searched when processing your spooled files. It might vary from user
to user.
Device resource library list
Specifies what libraries are searched when using a specific device, regardless of who is using the
device. This list does not change from user to user but can vary from device to device.
There are several reasons to use library lists:
• You can ensure that the necessary libraries are actually in the library list that Print Services Facility
(PSF) uses.
• They can improve performance when you specify only the libraries that need to be searched. For
example, you can specify one set of libraries for a 240-pel printer and another set for a 300-pel printer.
When searching for resources, the user library list is searched first and then the device library list. The
libraries are searched in the order listed. You can specify a user resource library list and a device resource
library list in the PSF configuration object.
Related concepts
Ensuring that you have the necessary AFP resources
You need to determine what resources you need for your Advanced Function Presentation (AFP)
application and ensure that they are stored in appropriate locations.
Related tasks
Search order of library list
Print Services Facility (PSF) uses the user library list and device library list to search for the AFP resources
that you specify.
Receiving AFP resources from another system
When you receive Advanced Function Presentation (AFP) resource data from an operating system other
than IBM i, you typically cannot change the resource. If you want to change the resource, it must be
changed on the originating operating system and then resent to IBM i.
Printing data sent to IBM i from zSeries
PSF can print data that was generated on zSeries. This data might be AFP, AFPDSLINE (AFP data mixed
with line data), or line data. The data might be sent to network files or directly to an output queue.

AFP font libraries


IBM supplies several AFP font libraries. In addition, you can create a library list that allows AFP to locate
and use other fonts.
When a printer writer is started for an Advanced Function Presentation (AFP)-configured printer and a font
is specified, the operating system searches in these locations:
1. User library list
2. IBM-supplied font libraries

Advanced Function Presentation (AFP) 31


The IBM-supplied font libraries are:
• QFNTCPL
This library contains the AFP Compatibility Fonts. These are the fonts included with IBM i.
• Single-byte character set font libraries numbered QFNT01 through QFNT19 and double-byte character
set font libraries numbered QFNT61 through QFNT69.
These are the font libraries that support various IBM licensed programs on IBM i.
Any of the libraries in the previous list that are found are put in the library list of the job printing the
spooled file. These libraries are then available to the device even if they were not in the library list of
the user that created the spooled file. Also, if you have acquired additional font resources, you can store
them in these IBM-supplied font libraries. Storing them in the IBM-supplied libraries provides widespread
access to the font.
You can use a font that is not in one of the QFNTxx libraries. To do so, add the library containing the font to
your library list when you create the spooled file.
For information about specifying a different font library list on a printer, see the Resource library lists
topic.
To list the font libraries available on your system and the fonts in them, use the WRKFNTRSC command.
Related concepts
AFP fonts
A font is a collection of characters of a certain size, typeface, and type style. Advanced Function
Presentation (AFP) fonts, also called Font Object Content Architecture (FOCA) fonts, are the standard
fonts used for Intelligent Printer Data Stream (IPDS) output. AFP fonts are made up of a code page and
a character set. All AFP fonts are encoded as either single-byte or double-byte fonts, depending on the
language for which they are being used.
Ensuring that you have the necessary AFP resources
You need to determine what resources you need for your Advanced Function Presentation (AFP)
application and ensure that they are stored in appropriate locations.
Related reference
Work with Font Resources (WRKFNTRSC) command

PSF configuration options


PSF allows you to specify printing options in several ways.
Print Services Facility (PSF) configuration objects allow you to enable print functions like Intelligent
Printer Data Stream (IPDS) pass-through, IPDS-to-PDF transform support, printer sharing, and automatic
system recovery. Printer files and resources such as form definitions and page definitions control the
appearance of printed output.
Related tasks
Configuring PSF
You can configure Print Services Facility (PSF) by using the printer device description or by using a PSF
configuration object.

PSF configuration objects


A Print Services Facility (PSF) configuration object lets you specify Intelligent Printer Data Stream (IPDS)
printer customization options that you cannot specify elsewhere.
These are some of the print functions that you can enable or disable with a PSF configuration object:
• “IPDS pass-through” on page 33
• IPDS-to-PDF transform
• Session and IPDS dialog sharing

32 IBM i: Advanced Function Presentation (AFP)


• “Resource library lists” on page 31
• “Automatic session recovery” on page 66
• Offset stacking and edge marking
• Public data authority for directories created by PSF
Related concepts
Specifying a PSF configuration object
Specify a PSF configuration object in the device description for the printer.
Enabling IPDS pass-through support
When IPDS pass-through support is enabled for a printer, all eligible files spooled to that printer are
processed without conversion to AFPDS and to printer-specific IPDS.
Related tasks
Configuring PSF
You can configure Print Services Facility (PSF) by using the printer device description or by using a PSF
configuration object.
Search order of library list
Print Services Facility (PSF) uses the user library list and device library list to search for the AFP resources
that you specify.

IPDS pass-through
IPDS pass-through allows you to process some SCS and IPDS spooled files more efficiently.
Before printing, SNA character string (SCS) files are converted to Intelligent Printer Data Stream (IPDS)
files. These are then converted to Advanced Function Presentation data stream (AFPDS), and then to
printer-specific IPDS. Also, IPDS files are converted to AFPDS, then are converted to printer-specific
IPDS. The final IPDS files have specific commands for your printer. You can choose to skip the conversion
to AFPDS and to printer-specific IPDS. This is called IPDS pass-through. IPDS pass-through is specified
on a PSF configuration object.
Specifying IPDS pass-through in the PSF configuration object allows only those spooled files eligible for
IPDS pass-through to bypass the extra transforms. Those spooled files not eligible for IPDS pass-through
are still transformed to AFPDS and then to printer-specific IPDS.
Figure 2 on page 34 shows the data stream origination, flow, and conversion for a spooled file when
IPDS pass-through support is enabled.

Advanced Function Presentation (AFP) 33


System i with IPDS Pass-through support enabled

Application

DDS specifications Print options

Spooled file in output queue

Writer

(AFP data stream) (IPDS data stream) (SCS data stream)

(IPDS data stream) (IPDS data stream)

System i

Device

AFP printer

RBAFT525-1

Figure 2. Spooled file conversion with IPDS pass-through support

Consider using IPDS pass-through if one of these apply:


• You have applications that generate SCS or IPDS data streams when printing to an Advanced Function
Presentation (AFP) printer.
• You are using applications such as the IBM Business Graphics Utility for IBM i licensed program, GDDM,
or Virtual Print that do not support AFPDS.
• Your SCS or IPDS application does not contain any reference to overlays or to host font character sets.

Limitations of IPDS pass-through


These IPDS pass-through limitations determine whether a spooled file or printer is eligible for IPDS
pass-through:
• Some SCS or IPDS spooled files are not eligible for IPDS pass-through. One such situation is when they
contain special functions that require being transformed to AFPDS for the spooled file to print correctly.
Spooled files that contain the following data or printer file attributes are not eligible for IPDS pass-
through:
– For SCS or IPDS data streams, the data stream contains Image Object Content Architecture (IOCA) or
IM1.
– For SCS or IPDS data stream, a front or back overlay was specified in the printer file.
– For SCS data stream, IGCDTA(*YES) was specified in the printer file.
– For SCS or IPDS data streams, MULTIUP with REDUCE(*NONE) was specified in the printer file.
– For SCS or IPDS data stream, a form definition was specified in the printer file.
– The EDGESTITCH or CORNERSTPL finishing operation is specified in the printer file.

34 IBM i: Advanced Function Presentation (AFP)


If IPDS pass-through is specified but the spooled file is ineligible, a diagnostic message is sent and the
spooled file is processed as usual. It is transformed to AFPDS and then to printer-specific IPDS.
• IPDS pass-through support is available for any IPDS printer that provides resident fonts. This is
because the resident fonts referenced in the data stream must be mapped to the host fonts, which
are downloaded to the printer. Therefore, IPDS pass-through support is not available for these IPDS
printers: 3820, 3825, 3827, 3828, 3829, 3831, 3835, and 3900-001.
When a printer writer is started to an AFP(*YES) printer that does not support IPDS pass-through and
IPDSPASTHR(*YES) is specified, a diagnostic message is sent. The spooled file is transformed to AFPDS
and then to printer-specific IPDS.
Related concepts
Enabling IPDS pass-through support
When IPDS pass-through support is enabled for a printer, all eligible files spooled to that printer are
processed without conversion to AFPDS and to printer-specific IPDS.

How page definitions, form definitions, and printer files interact


You can use a printer file to specify some of the same options as you can specify with a page definition
and a form definition. This topic describes how PSF chooses an option when a printer file is used with a
page definition and form definition.

Page definition and the printer file


When you specify a page definition on the printer file, some printer file parameters might be ignored
when the spooled file is printed through Print Services Facility (PSF). For example, if you specify a page
definition and also specify line data or mixed data, an inline page definition is not built. In this case, the
following happens:
• If you send line data with a printer file to an Advanced Function Presentation (AFP) printer, PSF ignores
these printer file parameters:
– CDEFNT
– CHRID
– CPI
– FNTCHRSET
– FOLD
– FONT
– LPI
– MULTIUP
– PAGESIZE
– PAGRTT
– REDUCE
• If you send the line data with a page definition to a non-AFP printer with a device type of *LINE, the
page definition parameter is ignored and the printer file parameters are used. The line data is converted
to SNA character string (SCS) or Intelligent Printer Data Stream (IPDS).

Form definition and the printer file


When using a form definition, depending on the specifications given, some printer file parameters might
be ignored when output is printed through PSF. For example, if you specify a form definition, an inline
form definition is not built. In this case, if you send the line data with a form definition to an AFP device,
PSF ignores these printer file parameters:
• BACKMGN
• CORNERSTPL

Advanced Function Presentation (AFP) 35


• EDGESTITCH
• FORMFEED
• FRONTMGN
• MULTIUP (N_UP)
• PAGRTT
• PRTQLTY
• REDUCE (N_UP)
• SADLSTITCH
However, if you send the line data with a form definition to a non-AFP printer with a device type of *IPDS
or *SCS in this example, the form definition parameter is ignored and the printer file parameters are used.
When specifying a form definition, the values you specify on the printer file's DRAWER and DUPLEX
parameters override those values specified in the form definition. To use the drawer and duplex values
specified in the form definition, specify DRAWER(*FORMDF) and DUPLEX(*FORMDF) on the printer file.
Related concepts
Form definitions
A form definition is an Advanced Function Presentation (AFP) resource object that defines the
characteristics of the physical form to be printed on.
Page definitions
Page definitions are resources that format and compose line data into logical pages.
Page segments
Page segments are objects containing composed text and images that are prepared before formatting and
included during printing.
Specifying a form definition
To use or identify a fully qualified form definition, specify a value in the FORMDF parameter with a CL
command.
Specifying a page definition
To use or identify a fully qualified page definition, specify the PAGDFN parameter on a CL commands.
Specifying a PSF configuration object
Specify a PSF configuration object in the device description for the printer.

Planning for AFP


Use this information to help plan how to use Print Services Facility (PSF) in your environment.
Before using Advanced Function Presentation (AFP), use these topics to help you get ready.

Determining whether PSF is required


You must install PSF if you use certain printers, use IBM i to print line or mixed-mode data, or use certain
printer file parameters or DDS keywords.
The Print Services Facility (PSF) feature is required if your printer falls into one of these categories:
• Any TCP/IP attached IPDS printer.
• Any Twinax attached IPDS printer that uses PSF functions. See the lists of printer file parameters and
data description specifications (DDS) keywords that require PSF.
PSF is also required in these situations:
• IBM i is used to print any line or mixed-mode data.
• You use any of the parameters listed below.

36 IBM i: Advanced Function Presentation (AFP)


Printer file parameters that require PSF
• AFP characters (AFPCHARS)
• Back overlay (BACKOVL) (requires PSF when printing to a device with type *SCS)
• Corner staple (CORNERSTPL)
• Device type (DEVTYPE= *LINE, or *AFPDSLINE)
• Edge stitch (EDGESTITCH)
• Font resolution for formatting (FNTRSL)
• Front overlay (FRONTOVL) (requires PSF when printing to a device with type *SCS)
• IPDS pass-through (IPDSPASTHR)
• Multi-up (MULTIUP REDUCE(*NONE))
• Page definition (PAGEDEF)
• Saddle stitch (SADLSTITCH)
• Table reference characters (TBLREFCHR)
• User-defined data (USRDFNDTA (‘AFPRESPOOL(*PRINT|*NOPRINT)'))
• User-defined data (USRDFNDTA (‘IPDSPASTHR(*YES|*NO)'))
• User-defined data (USRDFNDTA (‘MAILSENDER(mail-sender-name)'))
• User-defined data (USRDFNDTA (‘MAILTAG(mail-tag | e-mail address)'))
• User-defined data (USRDFNDTA (‘PDFENCRYPT(*STMF | *SPLF | *NOMAIL)'))
• User-defined object (USRDFNOBJ (*PSFCFG))
• User resource library list (USRRSCLIBL(*DEVD))

DDS keywords that require PSF


• Document Index Tag (DOCIDXTAG)
• End page group (ENDPAGGRP)
• Graphic data file (GDF)
• Invoke data map (INVDTAMAP)
• Start page group (STRPAGGRP)
• Staple (STAPLE)
• Z-fold (ZFOLD)

Installing PSF
This topic points to instructions for installing PSF and lists installation options.
To install Print Services Facility (PSF) , follow the instructions in the Installing, upgrading, or deleting IBM i
and related software topic.

PSF options
There are three options associated with PSF. Depending on what you purchase, you will be issued a key
for one of these options:
• 36: PSF 1–55 pages per minute license
• 37: PSF 1–100 pages per minute license
• 38: PSF Any speed license
Related tasks
Installing, upgrading, or deleting IBM i and related software

Advanced Function Presentation (AFP) 37


Ensuring that you have the necessary AFP resources
You need to determine what resources you need for your Advanced Function Presentation (AFP)
application and ensure that they are stored in appropriate locations.
Resource objects contain data and control information that can be used by a printing job. Resources can
be shared by different pages and different print data sets. Examples of resources are fonts, which define
the characters used to print text, and page segments, which can include images and text. Resources can
be stored and accessed from within the operating system being used. By referring to the name of the
stored resource, many data streams can share the same resources.
Most resources should be placed in a library that is defined to your library list when you initially sign on
the system. However, some resources, such as TrueType fonts and object containers, are stored in the
integrated file system. True Type Fonts must be stored in specific directories but you can store object
containers in any directory.
Related concepts
AFP font libraries
IBM supplies several AFP font libraries. In addition, you can create a library list that allows AFP to locate
and use other fonts.
AFP resources
Advanced Function Presentation (AFP) resource objects contain data and control information.
Resources in the integrated file system
Print Services Facility (PSF) can process several types of Advanced Function Presentation (AFP) and
non-AFP resources that are stored in the integrated file system. These are objects that are not stored
within a page segment or overlay.
Resource library lists
A resource library list specifies the libraries that are searched for the Advanced Function Presentation
(AFP) resources needed to process a spooled file.
Obtaining AFP resources
There are many sources of Advanced Function Presentation (AFP) resources.

Getting started with AFP


Use this information to help you get started using PSF by using AFP resources and creating AFP data.
Use the information in these topics to get started using Advanced Function Presentation (AFP).

Obtaining AFP resources


There are many sources of Advanced Function Presentation (AFP) resources.
Some of the resources are included with the system. You can download resources from another
system, or they can come inline with the data that is to be printed. Form definitions, fonts, page
segments, overlays, and page definitions are examples of resources that can come from another system.
Additionally, you can create overlays and page segments yourself using the IBM Infoprint Designer for
iSeries licensed program (5733-ID1). You can generate page segments and overlays from existing images
using the IBM Infoprint Server for iSeries licensed program (5722-IP1).
Related concepts
AFP fonts
A font is a collection of characters of a certain size, typeface, and type style. Advanced Function
Presentation (AFP) fonts, also called Font Object Content Architecture (FOCA) fonts, are the standard
fonts used for Intelligent Printer Data Stream (IPDS) output. AFP fonts are made up of a code page and
a character set. All AFP fonts are encoded as either single-byte or double-byte fonts, depending on the
language for which they are being used.
Form definitions

38 IBM i: Advanced Function Presentation (AFP)


A form definition is an Advanced Function Presentation (AFP) resource object that defines the
characteristics of the physical form to be printed on.
Object containers
Object containers are used to carry non-Object Content Architecture (OCA) objects in an Advanced
Function Presentation (AFP) data stream.
Overlays
Overlays, also known as electronic forms, are a collection of predefined data such as lines, shading, text,
boxes, or logos. They can be merged with variable data on a sheet while a spooled file is being processed.
Page definitions
Page definitions are resources that format and compose line data into logical pages.
Page segments
Page segments are objects containing composed text and images that are prepared before formatting and
included during printing.
TrueType and OpenType fonts
There is extensive operating system support for TrueType fonts, and they are popular with PC
applications. Consequentially, TrueType is probably the most prevalent font technology in the industry
today. OpenType is an extension of the TrueType font format.
Ensuring that you have the necessary AFP resources
You need to determine what resources you need for your Advanced Function Presentation (AFP)
application and ensure that they are stored in appropriate locations.

Fonts provided by IBM i


IBM i AFP Compatibility Fonts is included free of charge in the IBM i base operating system.
AFP Compatibility Fonts can be installed as an option on any IBM i system. The fonts are downloadable
240-pel raster fonts and are installed in font library QFNTCPL.
The 240- and 300-pel versions of the AFP Compatibility Fonts are provided in the IBM AFP Font
Collection for Workstations and OS/400® licensed product.
When your operating system was loaded, you chose to install or not install IBM-supplied fonts. If you did
not install the fonts and now want to install them, see Installing, upgrading, or deleting IBM i and related
software for instructions.
The compatibility set is provided to allow IBM i applications that use resident fonts to print on the 3820,
3825, 3827, 3828, 3829, 3831, 3835, and 3900 model 1 printers. The numeric font identifiers specified
in the application are translated into one of the fonts in the compatibility set.
The AFP Compatibility Fonts feature includes both uniformly spaced and mixed-pitch type families at
240-pel resolution. These font families are included:
• APL
• Boldface
• Courier
• Document
• Essay
• Format
• Gothic
• Orator
• Prestige
• Proprinter Emulation
• Roman
• Script

Advanced Function Presentation (AFP) 39


• Serif
• Symbol Set
• Text
In addition to these 240-pel raster fonts, the compatibility set includes a number of code pages that
are downloadable to printers. For use on printers that support outline fonts, the compatibility set also
includes a Letter Gothic outline font that contains the euro symbol.
To determine the fonts that are available on your system, use the WRKFNTRSC command.
Related concepts
Purchasing fonts
IBM offers several different font products that you can purchase, depending on your needs.
Related tasks
Installing, upgrading, or deleting IBM i and related software PDF
Related information
Font Summary for AFP Font Collection (S544-5633) PDFThis publication describes the AFP Compatibility
Fonts.

Purchasing fonts
IBM offers several different font products that you can purchase, depending on your needs.
IBM AFP Font Collection for AS/400, v3.1 (Program 5733-B45)
IBM AFP Font Collection for i is the current and recommended AFP font product. It replaces
IBM Infoprint Fonts for Multiplatforms (Program 5648-E77) and the IBM AFP Font Collection for
Workstations and OS/400 (Program 5648-B45).
IBM Advanced Function Printing Fonts for AS/400 (Program 5769-FNT)
This licensed program is only required for compatibility with older font technology.
IBM Advanced Function Printing DBCS Fonts for AS/400 (Program 5769-FN1)
This licensed program is only required for compatibility with older font technology.
There are many sources of TrueType fonts. However, not all TrueType fonts are suitable for use in
Advanced Function Presentation (AFP). In general, a TrueType font that is to be installed and referenced
in an AFP system must be Unicode-enabled. A Unicode-enabled font has these characteristics:
• It must contain a Microsoft Unicode subtable that is identified by platform ID = 3 (Microsoft) and
platform-specific encoding ID = 1 (Unicode, UTF-16).
• It must specify a full font name (Name ID 4) using the same encoding in the naming table.
The TrueType fonts included with IBM i and installed with option 43 Additional fonts are suitable for use in
AFP.
Related concepts
TrueType and OpenType fonts
There is extensive operating system support for TrueType fonts, and they are popular with PC
applications. Consequentially, TrueType is probably the most prevalent font technology in the industry
today. OpenType is an extension of the TrueType font format.
Fonts provided by IBM i
IBM i AFP Compatibility Fonts is included free of charge in the IBM i base operating system.
Related information
IBM AFP Font Collection for i, V3.1

40 IBM i: Advanced Function Presentation (AFP)


Creating AFP resources
There are several different ways to create the Advanced Function Presentation (AFP) resources that you
need.

Creating page segments and overlays


There are several tools available for you to use to create page segments and overlays:
• The IBM Infoprint Designer for iSeries licensed program lets you design and create page segments and
overlays and upload them to the iSeries.
• The IBM Infoprint Server for iSeries licensed program lets you create page segments and overlays from
Joint Photographic Experts Group (JPEG), Graphics Interchange Format (GIF), and Tagged Image File
Format (TIFF) images.
• The AFP Manager component of System i® Navigator lets you build a file on your system as a page
segment or overlay. This file must already be in AFP resource format. This tool is useful for migrating
AFP resources from other systems to the IBM i.
• The AFP printer driver creates AFP documents, overlays, and page segments from your Windows
applications.

Creating page definitions and form definitions


Page definitions and form definitions are created automatically with Infoprint Designer when you create
an overlay.

Receiving AFP resources from another system


When you receive Advanced Function Presentation (AFP) resource data from an operating system other
than IBM i, you typically cannot change the resource. If you want to change the resource, it must be
changed on the originating operating system and then resent to IBM i.
Follow these steps to receive an AFP resource from another system:
1. Place the received resource in a data file.
2. Start an System i Navigator session.
3. Expand My Connections (or your active environment).
4. If you do not have an AFP Manager icon, install AFP Manager as follows: Right-click My Connections
(or your active environment) and select Install Options > Selective Setup.
5. Expand Resources.
6. Right-click the appropriate resource type and select Import.
7. Specify the name of the source file and the name and location for the new resource to be created.
Related concepts
Resource library lists
A resource library list specifies the libraries that are searched for the Advanced Function Presentation
(AFP) resources needed to process a spooled file.
Sending data from zSeries to IBM i
Use these instructions to receive and print data and resources from zSeries systems to your IBM i.
Receiving resources and AFPDS data sent to network files
To make receiving resources and Advanced Function Presentation data stream (AFPDS) data as easy as
possible, you should be aware of these points.
Sending data from zSeries to IBM i network files

Advanced Function Presentation (AFP) 41


The examples in this topic show how to send print data and resources from a zSeries system to an IBM i
network file.

Receiving fonts from zSeries


Fonts can be downloaded to IBM i from zSeries systems.
Check your licensing agreements to see if they preclude the transfer of printer resources between
operating systems.
Downloaded font resources cannot be altered by the IBM i operator. If changes need to be made to any
font resources, the zSeries site must be notified.
When these font resources are received from the zSeries system, you place them in a data file. To convert
these font resources to a format that can be used by IBM i, use the Create Font Resource (CRTFNTRSC)
command.

3800 Printer font restrictions on IBM i


• You can receive data from a zSeries system that was generated to print on a 3800 printer using 3800
printer font character sets. However, IBM i does not support the 3800 printer and its font character sets.
Therefore, you should not receive 3800 printer font character sets on IBM i.
• If you have Advanced Function Presentation (AFP) data that calls for a 3800 font and you have the 3800
printer font character sets on the system, IBM i tries to use them. You get an error when the data prints.
• Instead, download the 3820 printer font character sets from the zSeries system. When the data
generated for the 3800 printer starts to print, IBM i substitutes the 3820 printer font character sets.
• The naming convention for 3800 printer font character sets is C1xxxxxx. The naming convention for
3820 printer font character sets is C0xxxxxx.
Related concepts
Sending data from zSeries to IBM i network files
The examples in this topic show how to send print data and resources from a zSeries system to an IBM i
network file.
Related reference
Create Font Resource (CRTFNTRSC) CL command

Receiving AFP resources inline in the data stream


Advanced Function Presentation (AFP) resources can be part of the data received from another system,
such as a zSeries system.
These resources can only be used in that data stream. They cannot be saved to your IBM i system in a
data file and converted to an AFP resource.

Receiving resources and AFPDS data sent to network files


To make receiving resources and Advanced Function Presentation data stream (AFPDS) data as easy as
possible, you should be aware of these points.
• Make sure you do not send line data or mixed data (AFPDSLINE data) to network files.
• The AFPDS files, as they exist on z/OS, are in variable-length record format. Make sure the z/OS site
converts the AFPDS files to a fixed-length record format. If this is not done before sending the AFPDS
files, large amounts of IBM i disk space are required. You need to reach an agreement with the z/OS site
as to what fixed-length record format you will use; for example, 4000 bytes. AFPDS records longer than
the fixed-length record size must be converted into multiple fixed-length records. Pad the last record
with blank characters if necessary.
• Before receiving AFPDS files from z/OS, you should consider creating a fixed-length physical data file to
hold the files from z/OS. The CL command to do this is Create Physical File (CRTPF).
The length of the records in the physical data file should be the number that you and the z/OS site
agreed to; for example, 4000 bytes.

42 IBM i: Advanced Function Presentation (AFP)


When resource data is received from z/OS, convert the resources to a format that can be used by IBM i.
These commands are in the “Creating AFP resources” on page 41 topic.

Creating a physical file


Many types of resources are sent to the IBM i system. Administratively, it is more convenient to store the
different types of resources in separate physical files. That is, put all the font data in a physical file that
contains only fonts, the overlay data in a physical file that contains only overlays, and so on.
This command creates a physical file that can receive resources and AFPDS data:

CRTPF FILE(MYLIB/MYFILE) RCDLEN(4000) MBR(*NONE) MAXMBRS(*NOMAX) LVLCHK(*NO)

Examples: Using the Work with Network Files (WRKNETF) and Receive Network File
(RCVNETF) commands
Use the Work with Network Files (WRKNETF) and Receive Network File (RCVNETF) commands to receive,
delete, browse, or submit (print) files.
This command lets you work with the network files for USR1 and prints the output with the job's spooled
output. This command can only be issued by USR1, a member of the USR1 group, or a user with security
officer authority.

WRKNETF USER(USR1) OUTPUT(*PRINT)

This command lets you work with the network files for all users and is written to the first member of the
specified database file. If the file exists in a library on the library list, the existing file is used; otherwise,
the file is created in library QGPL. If the file did not exist, or did not contain any members, a member with
the same name as the file is added to the file. Otherwise, the first member of the file is cleared and used.
Only a user with security officer authority can issue this command.

WRKNETF USER(*ALL) OUTPUT(*OUTFILE) OUTFILE(NETFILES)

This command receives the network file SCRIPT, member $REPORT, into a physical file named MYFILE in
library MYLIB. The new member in MYFILE is $REPORT.

RCVNETF FROMFILE(SCRIPT) TOFILE(MYLIB/MYFILE) FROMMBR($REPORT)

Related concepts
Sending data from zSeries to IBM i
Use these instructions to receive and print data and resources from zSeries systems to your IBM i.
Related tasks
Printing data sent to IBM i from zSeries
PSF can print data that was generated on zSeries. This data might be AFP, AFPDSLINE (AFP data mixed
with line data), or line data. The data might be sent to network files or directly to an output queue.
Receiving AFP resources from another system
When you receive Advanced Function Presentation (AFP) resource data from an operating system other
than IBM i, you typically cannot change the resource. If you want to change the resource, it must be
changed on the originating operating system and then resent to IBM i.
Related reference
Create Physical File (CRTPF) CL command
Receive Network File (RCVNETF) CL command
Work with Network Files (WRKNETF) CL command

Advanced Function Presentation (AFP) 43


Specifying AFP resources
When specifying an overlay, page definition, or page segment, you need to include the library that
contains the resource in your library list.
If you have more than one overlay, page definition, or page segment with the same name, make sure the
one you want to use is in the first library searched. Otherwise, you might specify the correct name, but get
the wrong resource in your output. When PSF searches for resources, it searches the user library list first
and then the device library list.
If you have a resource that many users need to access (fonts, for example), you might put that resource
in a library that everyone can access. Some such libraries are those identified in the system values
QSYSLIBL or QUSRLIBL.
Alternatively, if you have a resource to which you want to restrict access (signatures, for example), you
might put it in a library that only certain users can access. If you own the library that the resources are
stored in, you can grant access to that library with the Grant Object Authority (GRTOBJAUT) command.

Specifying a form definition


To use or identify a fully qualified form definition, specify a value in the FORMDF parameter with a CL
command.
The following CL commands allow you to specify the FORMDF parameter:
• Create Printer File (CRTPRTF)
• Change Printer File (CHGPRTF)
• Override with Printer File (OVRPRTF)
You can specify a form definition with these device types:
• *AFPDS
• *AFPDSLINE
• *IPDS
• *LINE
• *SCS
• *USERASCII (If the data is ASCII XML, a page definition and form definition are required.)
When you specify output to an Advanced Function Presentation (AFP) printer but do not specify a form
definition, an inline form definition is built from the printer file parameters. The inline form definition is
then passed to Print Services Facility (PSF).
Depending on the specifications given, some printer file parameters might be ignored when output is
printed through PSF.
To indicate an output bin for a form definition, specify the OUTBIN parameter on the printer file.
Use Change Spooled File Attributes (CHGSPLFA) to change the spooled file attributes for the form
definition.
Related concepts
Form definitions
A form definition is an Advanced Function Presentation (AFP) resource object that defines the
characteristics of the physical form to be printed on.
Page segments
Page segments are objects containing composed text and images that are prepared before formatting and
included during printing.
How page definitions, form definitions, and printer files interact

44 IBM i: Advanced Function Presentation (AFP)


You can use a printer file to specify some of the same options as you can specify with a page definition
and a form definition. This topic describes how PSF chooses an option when a printer file is used with a
page definition and form definition.
Related reference
Change Printer File (CHGPRTF) CL command
Create Printer File (CRTPRTF) CL command
Change Spooled File Attributes (CHGSPLFA) CL command
Grant Object Authority (GRTOBJAUT) CL command
Override with Printer File (OVRPRTF) CL command

Specifying a page definition


To use or identify a fully qualified page definition, specify the PAGDFN parameter on a CL commands.
The following CL commands allow you to specify the PAGDFN parameter:
• Create Printer File (CRTPRTF)
• Change Printer File (CHGPRTF)
• Override with Printer File (OVRPRTF)
You can specify a page definition with *LINE, *AFPDSLINE, or *USERASCII data.
Note: If the data is ASCII XML (*USERASCII), a page definition and form definition are required. After
Print Services Facility (PSF) completes formatting, it converts the line data and page definition to
Intelligent Printer Data Stream (IPDS).
When you specify a page definition on the printer file, some printer file parameters might be ignored when
the spooled file is printed through PSF.
To change the PAGDFN spooled file attribute, use the Change Spooled File Attributes (CHGSPLFA)
command.
Related concepts
Page definitions
Page definitions are resources that format and compose line data into logical pages.
How page definitions, form definitions, and printer files interact
You can use a printer file to specify some of the same options as you can specify with a page definition
and a form definition. This topic describes how PSF chooses an option when a printer file is used with a
page definition and form definition.
Related reference
Change Printer File (CHGPRTF) CL command
Change Spooled File Attributes (CHGSPLFA) CL command
Create Printer File (CRTPRTF) CL command
Override with Printer File (OVRPRTF) CL command

Specifying a PSF configuration object


Specify a PSF configuration object in the device description for the printer.
To use a Print Services Facility (PSF) configuration object, do these on either the Create Device
Description (Printer) (CRTDEVPRT) or Change Device Description (Printer) (CHGDEVPRT) commands:
• Name the PSF configuration object on the User Defined Object (USRDFNOBJ) parameter.
• Specify AFP(*YES).
Example: In this example, the device named MYPRINTER is configured to reference the PSF configuration
object MYPSFCFG. MYPSFCFG is in the library MYLIB.

CHGDEVPRT DEVD(MYPRINTER) AFP(*YES) USRDFNOBJ(MYLIB/MYPSFCFG *PSFCFG)

Advanced Function Presentation (AFP) 45


Any device description for an Intelligent Printer Data Stream (IPDS) printer specified as AFP(*YES) can
use any PSF configuration object. PSF checks for a PSF configuration object when a writer is started.
Related concepts
PSF configuration objects
A Print Services Facility (PSF) configuration object lets you specify Intelligent Printer Data Stream (IPDS)
printer customization options that you cannot specify elsewhere.
How page definitions, form definitions, and printer files interact
You can use a printer file to specify some of the same options as you can specify with a page definition
and a form definition. This topic describes how PSF chooses an option when a printer file is used with a
page definition and form definition.
Enabling IPDS pass-through support
When IPDS pass-through support is enabled for a printer, all eligible files spooled to that printer are
processed without conversion to AFPDS and to printer-specific IPDS.
Related tasks
Configuring PSF
You can configure Print Services Facility (PSF) by using the printer device description or by using a PSF
configuration object.
Related reference
Create Device Description (Printer) (CRTDEVPRT) CL command
Change Device Description (Printer) (CHGDEVPRT) CL command
Sharing print sessions
You can specify printer-sharing properties on the PSF configuration object. This lets you limit the amount
of time that you have a connection to the printer, control when the session is released, control when a
new session is started, and specify how many times PSF tries to connect to the printer.
Automatic session recovery
PSF can try to resume printing when a session has been unexpectedly ended by a device.

Specifying an overlay
To use overlays, specify them in the front and back overlay parameters of the printer file being used with
your application.
Use one of these commands or keywords:
• Override with Printer File (OVRPRTF) command: Temporarily changes the printer file.
• Change Printer File (CHGPRTF) command: Permanently changes the printer file.
• Change Spooled File Attributes (CHGSPLFA) command: Changes the spooled file before printing.
• Data description specifications (DDS) OVERLAY keyword: For information about this keyword, see
Printer files in the DDS topic of the Programming category.
Related concepts
Overlays
Overlays, also known as electronic forms, are a collection of predefined data such as lines, shading, text,
boxes, or logos. They can be merged with variable data on a sheet while a spooled file is being processed.
Specifying a page segment
A page segment object can be built into your application output in a number of ways.
Related reference
Change Printer File (CHGPRTF) CL command
Change Spooled File Attributes (CHGSPLFA) CL command
Override with Printer File (OVRPRTF) CL command

46 IBM i: Advanced Function Presentation (AFP)


Specifying an AFP font
There are many different tools you can use to specify Advanced Function Presentation (AFP) fonts in your
document. Each tool has different capabilities.
Use the tool that best fits your needs. These tools are discussed in greater detail in other topics and
related publications.
DDS
You can use keywords in your Data description specifications (DDS) application to specify fonts,
including how they look and how they are placed. The example in “Example: Specifying a font” on
page 48 uses DDS.
IBM Infoprint Designer for iSeries
This graphical tool lets you use menus to specify fonts and font properties, such as size and weight.
You can also specify placement properties, such as alignment and orientation.
AFP printer driver
This device driver can be used to produce AFP documents, overlays, and page segments from
Windows applications that support printing to AFP printers.
IBM Advanced Function Printing Utilities
You can specify fonts in the components of AFP Utilities.
Third-party applications
Several third-party applications exist that you can use to work with fonts in a document. Some such
products are Papyrus, Elixir, Opus, StreamServe, and DOC1.
To determine the names of the fonts that are available on your system, use the WRKFNTRSC command.
Related concepts
AFP fonts
A font is a collection of characters of a certain size, typeface, and type style. Advanced Function
Presentation (AFP) fonts, also called Font Object Content Architecture (FOCA) fonts, are the standard
fonts used for Intelligent Printer Data Stream (IPDS) output. AFP fonts are made up of a code page and
a character set. All AFP fonts are encoded as either single-byte or double-byte fonts, depending on the
language for which they are being used.
Related tasks
DDS keyword finder
Related reference
Work with Font Resources (WRKFNTRSC) command
How TrueType and OpenType fonts differ from AFP fonts
When using TrueType fonts, you will see differences in how the fonts are specified, managed, and
installed when compared to Advanced Function Presentation (AFP) fonts.
Example: Specifying a font
This example uses Data description specifications (DDS) keywords and RPG to specify TrueType and
Advanced Function Presentation (AFP) fonts.
Related information
Infoprint Server for iSeries: User's Guide (G544-5775) PDF
iSeries Guide to Output (S544-5319) PDF

Specifying a TrueType or OpenType font


You can specify a TrueType font anywhere that you can specify an Advanced Function Presentation (AFP)
font. You can also mix references to TrueType and AFP fonts. However, TrueType fonts are referenced
differently than AFP fonts.
Note: In this topic, the term TrueType refers to both TrueType and OpenType fonts.

Advanced Function Presentation (AFP) 47


To specify a TrueType font in your document, use the Data description specifications (DDS) FONTNAME
keyword to specify the TrueType font name. You can also use this keyword to specify other options, such
as a code page.
Usage notes:
1. If you do not specify a code page with the TrueType font, IBM i assumes that the print data that uses
this font is UTF-16.
2. The font name must match exactly, including the case, trailing blanks, embedded blanks, and so on.
3. You must ensure that your printer supports the specified font. If the printer does not support a
requested font, processing stops. No substitution is done.
Note: Any TrueType font that is to be used with AFP must be Unicode-enabled. This means that the font
must have these characteristics:
• It must contain a Microsoft Unicode subtable identified by platform ID = 3 (Microsoft) and platform-
specific encoding ID = 1 (Unicode, UTF-16).
• It must specify a full font name (Name ID 4) using the same encoding in the naming table.
Related concepts
TrueType and OpenType fonts
There is extensive operating system support for TrueType fonts, and they are popular with PC
applications. Consequentially, TrueType is probably the most prevalent font technology in the industry
today. OpenType is an extension of the TrueType font format.
Related tasks
DDS keyword finder
Related reference
How TrueType and OpenType fonts differ from AFP fonts
When using TrueType fonts, you will see differences in how the fonts are specified, managed, and
installed when compared to Advanced Function Presentation (AFP) fonts.

Example: Specifying a font


This example uses Data description specifications (DDS) keywords and RPG to specify TrueType and
Advanced Function Presentation (AFP) fonts.
The document is followed by the DDS keywords used.

48 IBM i: Advanced Function Presentation (AFP)


Figure 3. Document with several fonts

Advanced Function Presentation (AFP) 49


The fonts in the example have been specified using these DDS keywords. The line numbers below
correspond to the numbering in the sample document.

Line 1: FONT(2305 (*POINTSIZE 18)) COLOR(RED)


Line 2: FONTNAME('Courier New' (*POINTSIZE 20)(*CODEPAGE T1V10037)) COLOR(GRN)
Line 3: FNTCHRSET(C0S0BRTR T1V10037) COLOR(BLU)
Line 4: FONT(2311 (*POINTSIZE 18)) COLOR(PNK)
Line 5: FNTCHRSET(C0N500H0 T1V10500) COLOR(*RGB 50 50 75)
Line 6: FNTCHRSET(CZN500 T1V10284 (*POINTSIZE 18)) COLOR(*RGB 75 20 40)
Line 7: CDEFNT(X0N51EHC) COLOR(*CMYK 0 50 50 0)
Line 8: FONT(2304 (*POINTSIZE 24 10)) COLOR(*CMYK 50 0 0 50)
Line 9: FNTCHRSET(CZH200 T1V10274 (*POINTSIZE 48 10)) COLOR(TRQ)
Line 10: FONT(19) COLOR(BRN)
Line 11: FONT(420 (*POINTSIZE 18 50)) COLOR(RED) TXTRTT(270)
Line 12: FONT(420 (*POINTSIZE 18 50)) COLOR(RED) TXTRTT(90)

Figure 4. DDS keywords used to create the sample document

Notes:
1. To determine the names of the font character sets and coded fonts that are available on your system,
use the WRKFNTRSC command.
2. The TXTRTT keyword only works with fields, not constants.
3. The print data for lines 1 through 10 is constant text and was specified in the DDS source.
4. The print data for lines 11 and 12 is a data field that contains the printed text.
5. By using the code examples, you agree to the terms of the “Code license and disclaimer information”
on page 93.
Related tasks
DDS keyword finder
Related reference
Work with Font Resources (WRKFNTRSC) command
Specifying an AFP font
There are many different tools you can use to specify Advanced Function Presentation (AFP) fonts in your
document. Each tool has different capabilities.

Specifying a page segment


A page segment object can be built into your application output in a number of ways.
• Calling it in the printer file data description specifications (DDS)
• Referencing it in any overlay
• Placing it in a print application with the print format utility of the AFP Utilities licensed program
• Specifying it within a page definition or form definition
• Using it directly in Advanced Function Presentation (AFP) data streams
Related concepts
DDS for printer files
Page segments
Page segments are objects containing composed text and images that are prepared before formatting and
included during printing.
Specifying an overlay
To use overlays, specify them in the front and back overlay parameters of the printer file being used with
your application.
Creating AFP data

50 IBM i: Advanced Function Presentation (AFP)


There are several different ways to generate Advanced Function Presentation (AFP) data. You can use a
printer file, DDS keywords, Infoprint Server, the AFP printer driver, or Advanced Function Printing Utilities.

Specifying an object container


There are different ways to include object containers in your data, depending on your installation and how
you want to use them.
With the AFPRSC keyword, you can reference a print resource stored in the integrated file system,
including an object container.
You can specify at most 10 object containers per page of data. When using object containers, you must
ensure that the device to which you send the data supports the type of object included. Also, the system
searches for object containers differently than how it searches for other objects. The search method is
described in the documentation of the Data description specifications (DDS) AFPRSC keyword.
Related concepts
Object containers
Object containers are used to carry non-Object Content Architecture (OCA) objects in an Advanced
Function Presentation (AFP) data stream.
Related tasks
DDS keyword finder
Related information
iSeries Guide to Output (S544-5319) PDF

Search order of library list


Print Services Facility (PSF) uses the user library list and device library list to search for the AFP resources
that you specify.
It is essential that you understand how IBM i searches for Advanced Function Presentation (AFP)
resources. When you create a spooled file, the operating system saves the libraries in your library list.
Within that list are the libraries that contain the resources used to create the spooled file.
Related concepts
Resource library lists
A resource library list specifies the libraries that are searched for the Advanced Function Presentation
(AFP) resources needed to process a spooled file.
PSF configuration objects
A Print Services Facility (PSF) configuration object lets you specify Intelligent Printer Data Stream (IPDS)
printer customization options that you cannot specify elsewhere.
DDS AFPRSC keyword
Color management resources
Color management resources (CMRs) are the foundation of color management in AFP print systems. They
are AFP resources that provide all the color management information, such as ICC profiles and halftones,
that an AFP system needs to process a spooled file and maintain consistent color from one device to
another.
Related reference
Add Environment Variable (ADDENVVAR) CL command
Change Environment Variable (CHGENVVAR) CL command
Remove Environment Variable (RMVENVVAR) CL command
Work with Environment Variables (WRKENVVAR) CL command

Why you should use a library list


When specifying an overlay, page definition, or page segment, you need to include the library that
contains the resource in your library list. If you have more than one overlay, page definition, or page

Advanced Function Presentation (AFP) 51


segment with the same name, make sure the one you want to use is in the first library searched.
Otherwise, you might specify the correct name, but get the wrong resource in your output.
If you have a resource that you want many users to access (fonts, for example), put that resource in a
library that everyone can access. For example, you might put it in a library identified in the system value
QSYSLIBL.

Search order for resources that are not specified by the AFPRSC keyword
When the operating system searches libraries for the resources that are needed to print a spooled file, the
user library list is searched first and then the device library list. By default, the operating system searches
libraries in the following order:
1. System libraries
These libraries are identified in system value QSYSLIBL. System libraries are available to all users; they
are identified in your library list with a Type of SYS.
2. Current® library
The current library is identified in your user profile as the value for the current library (CURLIB)
parameter. In your library list, the current library has a Type of CUR.
3. User libraries
User libraries are identified in system value QUSRLIBL or in a job description. In your library list, these
libraries are identified with a Type of USR.
You can override the system library search list and specify a library search list for a particular device or
user. To do the library search list, use a PSF configuration object. If you create a PSF configuration object,
the defaults for the user and device library lists are the same as the library search described previously.

Search order for resources that are specified by the AFPRSC keyword
When you specify a resource by using the AFPRSC Data description specifications (DDS) keyword, the
operating system uses a different method to search for that resource. Instead, it uses a search order that
involves the environment variable QIBM_AFP_RESOURCES_PATH. The system searches the integrated file
system for those resources as described in the AFPRSC topic.

The QIBM_AFP_RESOURCES_PATH environment variable


The QIBM_AFP_RESOURCES_PATH environment variable is used when the DDS keyword AFPRSC is used
to specify objects in the integrated file system. This environment variable specifies the paths to search for
the specified object.
To specify multiple paths in QIBM_AFP_RESOURCES_PATH, use a colon to separate them. For example, /
home/officers/signatures:/home/checkimages/2003 identifies two directories to be searched:
• /home/officers/signatures (This directory is searched first.)
• /home/checkimages/2003 (This directory is searched second.)
The directories are searched in the order in which they are listed.
The /QIBM/UserData/OS400/AFPresources directory is created when IBM i is installed. It is always
available and always the last directory searched if a resource is not found in any of the directories that are
specified in QIBM_AFP_RESOURCES_PATH. If directories are not specified in the environment variable
or the environment variable is not created, then /QIBM/UserData/OS400/AFPresources is the only
directory searched. You do not need to specify the directory in QIBM_AFP_RESOURCES_PATH.
In V7R2, PSF might perform two searches for resources that are specified by the AFPRSC keyword. The
first search consists of checking each directory for a Data Object Resource Access Table (DO RAT). If the
resource is not specified in a DO RAT or you do not use DO RATs, then a search is made as in previous
releases. You do not need to use a DO RAT except where your needs require one, such as if you want to
associate a Color Management Resource with a resource without modifying your application.
You can use these CL commands to work with environment variables:

52 IBM i: Advanced Function Presentation (AFP)


• Work with Environment Variables (WRKENVVAR)
• Add Environment Variable (ADDENVVAR)
• Change Environment Variable (CHGENVVAR)
• Remove Environment Variable (RMVENVVAR)

Search order for Color Management Resources


The QIBM_AFP_CMR_PATH environment variable is used to specify the directories which PSF searches for
CMRs. PSF searches the directories in the QIBM_AFP_CMR_PATH environment variable after searching all
inline resources included in the spooled file. For more information about CMRs, see “Color management
resources” on page 17.
To specify multiple paths in QIBM_AFP_CMR_PATH, use a colon to separate them. For example, /QIBM/
UserData/CMRgroup1:/QIBM/UserData/CMRgroup2 identifies two directories to be searched:
• /QIBM/UserData/CMRgroup1 (This directory is searched first.)
• /QIBM/UserData/CMRgroup2 (This directory is searched second.)
The directories are searched in the order in which they are listed.

Creating AFP data


There are several different ways to generate Advanced Function Presentation (AFP) data. You can use a
printer file, DDS keywords, Infoprint Server, the AFP printer driver, or Advanced Function Printing Utilities.

Creating AFP data by using a printer file


You can create AFP data on IBM i from applications using a printer file with the device type (DEVTYPE)
parameter value set to *AFPDS.

Creating AFP data by using DDS keywords


You can create AFP data with Data description specifications (DDS) printing functions that are tailored for
use with AFP.

Creating AFP data by using IBM Infoprint Server for iSeries


Infoprint Server has a Create AFP Data (CRTAFPDTA) command that lets you transform line (*LINE) or
mixed (*AFPDSLINE) data into AFP (*AFPDS) data. It can also take an AFP file as input and generate
an AFP stream file. It can index a document for viewing, archiving, or document retrieval. Optionally, it
retrieves and packages the AFP resources that are needed for printing or viewing. Refer to the Infoprint
Server for iSeries: User's Guide for instructions to use the CRTAFPDTA command.

Creating AFP data by using the AFP printer driver for Windows
The AFP printer driver creates AFP documents, overlays, and page segments from your Windows
applications. For more information about the AFP printer driver or to download the printer driver, see
the InfoPrint Solutions Company web site .

Creating AFP data by using IBM Advanced Function Printing Utilities


By using the IBM Advanced Function Printing Utilities (AFP Utilities) licensed program, you can create
and print AFP data from an existing database file, merged with an overlay. For more information about
this licensed program, see AFP Utilities for iSeries: User's Guide (S544-5349). This publication is available
on the IBM Publications Center Web page at http://www.elink.ibmlink.ibm.com/public/applications/
publications/cgibin/pbi.cgi.

Advanced Function Presentation (AFP) 53


Related concepts
Specifying a page segment
A page segment object can be built into your application output in a number of ways.
DDS for printer files
Related information
Infoprint Server for iSeries: User's Guide (G544-5775) PDF

Printing AFP data with PSF


You can use Print Services Facility (PSF) to print both AFP data that was generated on IBM i and data that
was generated on a zSeries system and sent to IBM i.

Printing AFP data generated on IBM i


To print AFP data that was generated on IBM i, use an application program or the PRTAFPDTA command.
Follow these steps to generate and print Advanced Function Presentation data stream (AFPDS) data with
Print Services Facility (PSF):
1. Create the AFPDS data.
2. Optional: Specify overlays.
3. Generate an AFPDS spooled file.
Method 1: Use an application program. The application program that creates the data to be used with
the overlays might need to be tailored so the printed output fits with the overlays you designed.
Tailoring the program to fit the overlay is similar to tailoring the program to work with a preprinted
form.
Method 2: Use the Print AFP Data (PRTAFPDTA) command. If you have a database file that contains
AFP data, use the PRTAFPDTA command to spool the file.
If you want to use a prompt display with this command, type PRTAFPDTA and press F4 (Prompt).
Notes:
a. The PRTAFPDTA command prints AFPDS data. Any padding between the AFPDS structured fields
must be X'40' or X'00'.
b. When using the PRTAFPDTA command, do not override the DEVTYPE parameter on the system
printer file, QSYSPRT.
c. When using the PRTAFPDTA command, the form definition typically identifies the drawer to print
from. An exception is when an Override with Printer File (OVRPRTF) command has been issued with
a different drawer value. In this case, the drawer value is taken from the override command.
Examples
This command prints the first member in file MYFILE starting with page 2 and ending on page 6.

PRTAFPDTA FILE(MYLIB/MYFILE) STRPAGE(2) ENDPAGE(6)

This command prints the member $REPORT in file MYFILE using a form definition of F10101 and all
available exception handling.

PRTAFPDTA FILE(MYLIB/MYFILE) MBR($REPORT) FORMDF(F10101) FIDELITY(*CONTENT)

Note: By using the code examples, you agree to the terms of the “Code license and disclaimer
information” on page 93.
4. Release the spooled file to a device with device type *AFPDS.
Related reference
Print AFP Data (PRTAFPDTA) CL command

54 IBM i: Advanced Function Presentation (AFP)


Printing data sent to IBM i from zSeries
PSF can print data that was generated on zSeries. This data might be AFP, AFPDSLINE (AFP data mixed
with line data), or line data. The data might be sent to network files or directly to an output queue.
There are different steps to print data sent to a IBM i host, depending on where it is sent to.
Related concepts
Receiving resources and AFPDS data sent to network files
To make receiving resources and Advanced Function Presentation data stream (AFPDS) data as easy as
possible, you should be aware of these points.
AFP resources
Advanced Function Presentation (AFP) resource objects contain data and control information.
Resource library lists
A resource library list specifies the libraries that are searched for the Advanced Function Presentation
(AFP) resources needed to process a spooled file.
Sending data from zSeries to IBM i network files
The examples in this topic show how to send print data and resources from a zSeries system to an IBM i
network file.
Related tasks
Releasing a spooled file
Related reference
Print AFP Data (PRTAFPDTA) CL command

Printing data sent from zSeries to an IBM i network file


To print data that has been placed on an IBM i network file, follow these steps:
1. Receive the file to a library.
2. Use the Print AFP Data (PRTAFPDTA) command.
All resources must be processed this way.

Printing data sent from zSeries to an IBM i output queue


You can print data that has been placed on an IBM i output queue the same way you print any other
spooled file. However, there are some considerations when having data placed directly on an output
queue. If a printer is active for that output queue, spooled files placed directly into the output queue can
be printed without the owner of the queue realizing it. To avoid this, try one of these possible solutions:
• Create a special user ID and a special output queue for that user ID. You can then sign on using that
user ID and assign a printer to your output queue to print the spooled files.
• Make sure the output queue of the receiving user ID is held before the zSeries system sends the files.
• Use the End Writer (ENDWTR) command to end the printer assigned to that output queue before the
zSeries system sends the file.
When data is sent from a zSeries system to an IBM i output queue and then printed, it follows this path:
1. zSeries system
2. Target IBM i host, identified by a node ID
3. Target output queue for the target user ID
The target user ID must have access to the libraries containing the resources that the spooled file
needs when it prints on IBM i.
4. Target printer
Make sure that the printer you want to print the files on is assigned to the correct output queue. If any
special handling of the printer is necessary (form choice, drawer selection, envelopes, and so on), it
should be done before the files are sent.

Advanced Function Presentation (AFP) 55


Note: If you cannot find the spooled file on the output queue of the specified user ID, look in the QNFTP
job log for messages. The QNFTP job runs under the QSNADS user profile.

Transforming IPDS data to PDF


IPDS-to-PDF transform support, also called the PDF subsystem, is an IBM Infoprint Server for iSeries
function that lets you generate Portable Document Format (PDF) files or Advanced Function Presentation
(AFP) files (for spooling only) from AFP, SNA character string (SCS), or Intelligent Printer Data Stream
(IPDS) spooled files.
Intelligent routing is then used to route the output file. Intelligent routing is the ability to take the entire
spooled file or any segment of the input spooled file and do any combination of these:
• Generate a PDF file and send it as an e-mail attachment.
• Generate a PDF file and store it as a stream file in the integrated file system.
• Generate a PDF file and spool it.
• Generate an AFP file and spool it.
Intelligent routing is controlled by values in a PSF configuration object and a mapping program.
Note: The Print Services Facility (PSF) transform interface supports an IPDS-to-PDF transform program
that emulates a TCP/IP-connected IPDS 4028, 3812, or Infoprint 40 printer device.
An IPDS-to-PDF transform that can be used with PSF is provided in the IBM Infoprint Server for iSeries
product. The transform converts IPDS controls and data into PDF files. The output PDF files include text,
graphics, and image data, as appropriate. The transform also stores the mail tag in a comment statement
in the PDF output. The mail tag is specified in the printer file's USRDFNDTA parameter or the STRPAGGRP
Data description specifications (DDS) keyword. For detailed information about the IPDS-to-PDF transform
(including the user exit program), see the Infoprint Server for iSeries User's Guide. To use the transform
provided in Infoprint Server, PSF is not required.
A mapping program is a user exit program specified on the PSF configuration object's PDFMAPPGM
parameter. You can do these and more with a mapping program:
• Interpret routing tags
• Specify the subject of an e-mail
• Add text to the beginning of an e-mail
• Specify the path to store the PDF stream file
If you are using a Simple Mail Transfer Protocol (SMTP) server to send the e-mail, it has additional
capabilities, such as specifying carbon-copy (cc), blind-carbon-copy (bcc), and return-to e-mail
addresses; specifying a file to use as the body of an e-mail; and specifying attachments.
These topics describe the main ways to access the PDF subsystem and how to specify that a PDF file is
sent as e-mail:
Related information
Infoprint Server for iSeries: User's Guide (G544-5775) PDF

Transforming spooled files to PDF without manual setup


For operating systems later than V5R3, this method requires no setup. It is best for simple applications,
such as a trial run of a billing application. The input spooled files can be transformed in only one way, not
a combination.
Follow these steps to transform an Intelligent Printer Data Stream (IPDS), Advanced Function
Presentation (AFP), or SNA character string (SCS) spooled file to Portable Document Format (PDF)
automatically. This method is not available on operating systems earlier than V5R4. An Infoprint Server
for iSeries license is required.
Related tasks
Configuring e-mail

56 IBM i: Advanced Function Presentation (AFP)


Related information
Infoprint Server for iSeries: User's Guide (G544-5775) PDF

Prerequisites
1. If the PDF file will be sent as e-mail, make sure that IBM i is set up to send e-mail.
For instructions on setting up IBM i to send e-mail, see the Configure e-mail topic.
2. Optional: Write your mapping program.
Refer to the Infoprint Server for iSeries User's Guide for the format.

Transforming a spooled file to PDF


To transform a spooled file to PDF, do these steps:
1. Start a System i Navigator session.
2. Expand My Connections (or your active environment).
3. If you do not have an AFP Manager icon, install AFP Manager as follows:
Right-click My Connections (or your active environment) and select Install Options then Selective
Setup.
4. Expand Basic Operations and select Printer Output.
5. Right-click the output files you want to convert and select Convert to PDF.
The Convert to PDF wizard opens.
6. Follow the instructions in the wizard.

Transforming spooled files to PDF with manual setup


This method requires varying levels of setup, depending on the complexity of the required output. This
method gives you the most flexibility.

Prerequisites
1. Set up your PSF configuration object.
The Print Services Facility (PSF) configuration object you use specifies what is done with the PDF file
and other transform options.
2. Optional: Change the input file to create multiple output files or an indexed file.
3. Configure a device for PDF conversion.

Transforming a spooled file to PDF


To transform a spooled file, submit it to a printer that is set up correctly.

Setting up your PSF configuration object


Before you set up your Print Services Facility (PSF) configuration object, you need to decide what you
want done with the output file after it is created.
It can be stored in a directory as PDF, placed on an output queue as Advanced Function Presentation
(AFP) or PDF, or e-mailed as a PDF attachment.
Note: You must have system configuration authority (*IOSYSCFG) to create a PSF configuration object.
To create or change a PSF configuration object, follow these steps:
1. In System i Navigator, expand My Connections (or your active environment).
2. Expand AFP Manager.
If you do not have an AFP Manager icon, install AFP Manager as follows: Right-click My Connections
(or your active environment) and select Install Options then Selective Setup.
3. Create a new PSF configuration object or change one that already exists.

Advanced Function Presentation (AFP) 57


• To create a PSF configuration object, right-click the PSF configuration objects folder and select
New.
• To change a PSF configuration object, expand the PSF configuration objects folder, right-click the
PSF configuration object you want to change, and select Configure.
4. If you are creating a PSF configuration object, on the General page, specify a name.
5. On the PDF Destinations page, specify what you want done with the generated PDF files:
• Select Generate PDF.
• If you want the PDF files spooled to an output queue, select Store as printer output. You must also
specify the library-qualified output queue. Click Browse to search for an output queue.
• If you want the PDF files stored as a stream file in the integrated file system, select Store as stream
file. You must also specify the stream file directory where you want the PDF file stored.
• If you want the PDF files sent as e-mail, select Send as electronic mail.
• For Administrator address, specify the e-mail address of the PDF administrator. Any PDF files that
are not distributed correctly are attached (if possible) to an e-mail that is sent to this address. Your
IBM i must be set up to send e-mail to use this option. If the specified address is on an IBM i, that
IBM i must be set up to receive e-mail. For instructions about setting up your IBM i to send and
receive e-mail, see the Configure e-mail topic.
6. If you selected Send as electronic mail or specified an Administrator address, specify the mail
sender and, optionally, the mail server to use:
• Specify the e-mail sender or click the arrow to select from a list. The e-mail sender must be enrolled
in the system distribution directory.
Use the Display Directory Entries (DSPDIRE) command to view the entry in the system distribution
directory. If you have security administrator authority, you can change the Simple Mail Transfer
Protocol (SMTP) information with the Work with Directory Entries (WRKDIRE) command.
• If you want to specify the mail server to use, select Advanced. If you do not specify a mail server, the
Send Distribution (SNDDST) command is used. Many of the options available through the mapping
program require you to use an SMTP server.
7. On the PDF Processing page, specify any of these options to customize the PDF that is generated:
• If you want the fonts to be included in the output file, select Include PDF fonts inline. This ensures
fidelity when you print or view the file, but increases file size. This function only works with IP40240
or IP40300 device emulation.
• If you want PSF to use the named groups defined in the input file, select Generate multiple PDF
files.
– If you want the file split at named group boundaries, select Create separate PDF files.
– If you want one output file created with index tags at named group boundaries, select Create
single PDF file with index tags.
• In the Device emulation type field, specify the device that AFP should emulate.
• Specify the paper size in printer drawers one and two of the device specified for Device emulation
type.
• Specify the library-qualified data queue where the PDF transform status messages should be posted.
Click Browse to search for a library.
• If applicable, specify the library-qualified Mapping program. Click Browse to search for a library. If
you want to use a mapping object, select *IBMPGM.
• If applicable, specify the library-qualified Mapping object. Click Browse to search for the mapping
object.
8. Click OK.
For help with any field, select the field and press F1.

58 IBM i: Advanced Function Presentation (AFP)


Related tasks
Configuring e-mail
Related reference
Display Directory Entries (DSPDIRE) CL command
Send Distribution (SNDDST) CL command
Work with Directory Entries (WRKDIRE) CL command

Changing the input file to create multiple output files or an indexed file
You can insert group tags into your data before it is transformed. This lets the transform generate one
Portable Document Format (PDF) file for each group or insert an index tag at the beginning of each group.
The action taken depends on the value specified for the Multiple PDF Files (PDFMULT) parameter on
the Print Services Facility (PSF) configuration object. You can also use group tags to send each group as
e-mail to a different recipient. The group name is used as the index tag or mail tag when appropriate. For
information about putting mail tags on the group tags, see the Infoprint Server for iSeries User's Guide.
You can use a utility such as Data description specifications (DDS) or the IBM Infoprint Server for iSeries
Create AFP Data (CRTAFPDTA) command to insert group tags in your data. If you choose to specify
groups, all of the data must be inside a group.
To use DDS to generate groups, use the STRPAGGRP and ENDPAGGRP DDS keywords.
To use CRTAFPDTA to generate groups, follow the instructions in the Infoprint Server for iSeries User's
Guide to index your file. The value specified with Select index for group names (IDXGRP) is the group
name.
Related information
Infoprint Server for iSeries: User's Guide (G544-5775) PDF

Configuring a device for PDF conversion


Set up your device for Portable Document Format (PDF) conversion the same way you set up a TCP/IP
Intelligent Printer Data Stream (IPDS) printer.
You can have multiple IPDS-to-PDF printers active, but each must be configured as a different printer
with a different port. Use the Create Device Description (Printer) (CRTDEVPRT) command to specify the
following parameters:
Device description
printer-name
Device class
*LAN
Device type
*IPDS
Device model
0
LAN attachment
*IP
Advanced function printing
*YES
Port number
xxxxx, the number must be unique for each printer.
Font
printer font
Remote location
127.0.0.1

Advanced Function Presentation (AFP) 59


User defined object
Object
PSF-configuration-object-name
Library
PSF-configuration-object-library
Object type
*PSFCFG

Sending the PDF file as email


A mapping program, a mapping object, or the Print Services Facility (PSF) configuration object specifies
that an output Portable Document Format (PDF) file should be sent as email. A mail tag provides the email
address.
To specify that an output PDF file is sent as email, you can set up a mapping program for e-mail. For
instructions to set up a mapping program for email, see the Infoprint Server for iSeries User's Guide.
There are two ways to send the output file as email without using a mapping program:
• Specify PDFGEN(*MAIL) in the PSF configuration object.
• Use a mapping object.
After the PDF file creation, PSF retrieves the mail tag. The mail tag is on the printer file's User defined
data (USRDFNDTA) parameter or the Start page group (STRPAGGRP) Data description specifications
(DDS) keyword. If you do not specify an exit program, you must provide a valid e-mail address in the
USRDFNDTA parameter or in the STRPAGGRP DDS keyword. PSF then electronically mails the output. It
uses a Simple Mail Transfer Protocol (SMTP) server if one is specified in the PSF configuration object. If
none is specified, it uses the Send Distribution (SNDDST) command.

Format of the printer file's USRDFNDTA mail information


The format of the mail information when it is specified in the printer file's USRDFNDTA parameter is:

USRDFNDTA('MAILTAG(80 bytes of text) MAILSENDER(10 byte name)')

The 80 bytes of text can contain a mail address or a tag. The mail exit routine converts tags into a
mail address and an optional message. The MAILSENDER parameter is 10 bytes long and specifies the
name of the user profile that is sending the file. This parameter overrides the PSF configuration object's
PDFSENDER value.

Format of the STRPAGGRP mail tag


When you specify PDFMULT(*YES *SPLIT), the Name parameter of the STRPAGGRP DDS keyword can
contain a mail tag. The mail tag can contain either a mail address or a tag. The mail exit routine converts
tags into a mail address and an optional message. The STRPAGGRP name overrides a mail tag in the
printer file's USRDFNDTA parameter.
Related concepts
Suppress message text in an email
You can specify specific message text that goes into the body of an email or you can have PSF use default
text. You can also specify that no message text is to be added into the body of an email.
Variable data taken from spooled file attributes
You can use text that is taken from three spooled file attributes to be used in an email’s subject and
message text. This variable data can be used when PSF is obtaining subject and message text from either
a PDF map object (segmented and non-segmented entries) or from the subject and message text that is
specified with message PQT4133 in message file QPQMSGF.
Related tasks
Encrypting the PDF file

60 IBM i: Advanced Function Presentation (AFP)


The PDFENCRYPT parameter on the User defined data (USRDFNDTA) parameter specifies whether to
encrypt an output PDF stream file or spooled file and whether to send it as e-mail.
Related information
Infoprint Server for iSeries: User's Guide (G544-5775) PDF

Encrypting the PDF file


The PDFENCRYPT parameter on the User defined data (USRDFNDTA) parameter specifies whether to
encrypt an output PDF stream file or spooled file and whether to send it as e-mail.
To encrypt the output PDF file:
1. Specify the e-mail distribution option in a PDF map object entry or segment.
2. Specify encryption values for the e-mail distribution option.
3. Specify the name of the PDF map object with parameter PDFMAP in the Print Services Facility (PSF)
configuration object.
4. Specify the default IBM-supplied user program with parameter PDFMAPPGM in the PSF configuration
object.
5. Specify the PDFENCRYPT parameter on the printer file's or spooled file's USRDFNDTA parameter.
Values for the PDFENCRYPT parameter are:
*NONE
Encryption and e-mail distribution options are not specified at the spooled file level. The
encryption values specified in a PDF map object are used. Specifying PDFENCRYPT(*NONE) is
the same as not specifying PDFENCRYPT.
A value of *NONE cannot not be specified with any other values. If other values are specified with
*NONE they are ignored.
*NOMAIL
The e-mail is not sent. If this value is not specified, the e-mail is sent. Use *NOMAIL to encrypt a
stream file or spooled file without sending an e-mail.
*STMF
The generated PDF file placed in a stream file is encrypted. If this value is not specified and a
stream file is generated, the stream file is not encrypted. If the stream file distribution option is not
specified, this value is ignored.
*SPLF
The PDF file placed in a spooled file is encrypted. If this value is not specified and a spooled file is
generated, the spooled file is not encrypted If the spooled file distribution option is not specified,
this value is ignored.

Examples
• To convert a spooled file to an encrypted PDF, send it as e-mail, and write it as an encrypted PDF to the
integrated file system:
1. Specify the stream file distribution option in the PDF map object entry or segment.
2. Specify this parameter on the printer file or spooled file's attributes:

USRDFNDTA('PDFENCRYPT(*STMF)')

• To convert a spooled file to an encrypted PDF and spool it as an encrypted PDF without sending it as
e-mail:
1. Specify the spooled file distribution option in the PDF map object entry or segment.
2. Specify this parameter on the printer file or spooled file's attributes:

USRDFNDTA('PDFENCRYPT(*SPLF *NOMAIL)')

Advanced Function Presentation (AFP) 61


• To convert a spooled file to an encrypted PDF, spool it as an encrypted PDF, and write it as an encrypted
PDF to the integrated file system without sending it as e-mail:
1. Specify the stream file distribution option in the PDF map object entry or segment.
2. Specify the spooled file distribution option in the PDF map object entry or segment.
3. Specify this parameter on the printer file or spooled file's attributes:

USRDFNDTA('PDFENCRYPT(*NOMAIL *STMF *SPLF)')

• To convert a spooled file to an encrypted PDF, spool it as a PDF without encryption, and write it as an
encrypted PDF to the integrated file system without sending it as e-mail:
1. Specify the stream file distribution option in the PDF map object entry or segment.
2. Specify the spooled file distribution option in the PDF map object entry or segment.
3. Specify this parameter on the printer file or spooled file's attributes:

USRDFNDTA('PDFENCRYPT(*STMF *NOMAIL)')

Related concepts
Sending the PDF file as email
A mapping program, a mapping object, or the Print Services Facility (PSF) configuration object specifies
that an output Portable Document Format (PDF) file should be sent as email. A mail tag provides the email
address.
Related reference
Change Spooled File Attributes (CHGSPLFA) CL command

Suppress message text in an email


You can specify specific message text that goes into the body of an email or you can have PSF use default
text. You can also specify that no message text is to be added into the body of an email.
To specify that no message text be placed into an email, specify a value of *NONE any place that message
text can be specified. The value *NONE must always be specified in uppercase.
• PDF map entry. Specify *NONE for the message text.
• User map program. Specify *NONE for the message text and 5 for the length of message text
parameters.
• Message PQT4133. Change the message portion of the message to contain the value *NONE. The
message portion of PQT4133 begins at the 23rd character. Active writers must be ended and restarted
to retrieve the latest text. This text will be used by all writers as the default subject and message text.
Related concepts
Sending the PDF file as email
A mapping program, a mapping object, or the Print Services Facility (PSF) configuration object specifies
that an output Portable Document Format (PDF) file should be sent as email. A mail tag provides the email
address.

Variable data taken from spooled file attributes


You can use text that is taken from three spooled file attributes to be used in an email’s subject and
message text. This variable data can be used when PSF is obtaining subject and message text from either
a PDF map object (segmented and non-segmented entries) or from the subject and message text that is
specified with message PQT4133 in message file QPQMSGF.
Three variables can be specified in the subject and message text fields for which PSF substitutes the
appropriate text. The following variables are supported.
• &UD&. This variable references the User data spooled file attribute.
• &FT&. This variable references the Form type spooled file attribute.

62 IBM i: Advanced Function Presentation (AFP)


• &RT&. This variable references either the routing tag that is contained within spooled file data or the
Mail tag that is specified on the USRDFNDTA spool file attribute.
Here is more information on the use of these variables.
• The variables must be specified in uppercase.
• The variables can be specified for the Subject and Message text of an email.
• If a variable is specified and the data to be used for that field is blank, the variable is removed. No data
is substituted for the variable and the resulting string for the subject or message text is presented as if
no variable was placed in it.
• If the subject or message text becomes longer than allowed, the text is truncated. Emails that are sent
by SMTP do not have a limit for the message text.
• Trailing blanks are removed from the fields that provide the substitution text.
• There are no limits as to the number of times a variable can be specified in either the subject or
message fields.
• When you specify a value for MAILTAG on spooled file attribute USRDFNDTA, the value for MAILTAG
must not contain any blanks characters. If blanks are included, PSF does not use the MAILTAG value.

Example of using the variables


This example shows the use of the variables in a PDF map entry that specifies email distribution.
The email subject is: Your package to be delivered by &UD&
The Message text is: Your &RT& will be delivered within &FT& week(s).
The spooled file has the following values for the three attributes:
• The value for User data is FastMove. Variable &UD& refers to User data.
• The value for Form type is 1. Variable &FT& refers to Form type.
• The value for the User defined data is washing machine. Variable &RT& refers to User defined data.
When the email arrives at its destination, it has the following values.
• Subject of: Your package to be delivered by FastMove
• Message text of: Your washing machine will be delivered in 1 week(s).
Related concepts
Sending the PDF file as email
A mapping program, a mapping object, or the Print Services Facility (PSF) configuration object specifies
that an output Portable Document Format (PDF) file should be sent as email. A mail tag provides the email
address.

Generic support for PDF map object selection criteria


Generic values for the User data and Form type fields in a PDF map entry can be specified.
Generic values can be specified for the User data and Form type fields that are specified in a PDF map
entry as selection criteria. The input screen in the PDF map entry is not updated to indicate that generic
support is available for the User data and Form type fields. An error message is not issued when you
specify generic values for these fields.

Configuring PSF
You can configure Print Services Facility (PSF) by using the printer device description or by using a PSF
configuration object.
Related concepts
PSF configuration objects

Advanced Function Presentation (AFP) 63


A Print Services Facility (PSF) configuration object lets you specify Intelligent Printer Data Stream (IPDS)
printer customization options that you cannot specify elsewhere.
Specifying a PSF configuration object
Specify a PSF configuration object in the device description for the printer.
Related reference
Create Device Description (Printer) (CRTDEVPRT) CL command
Create PSF Configuration Object (CRTPSFCFG) CL command
Change Device Description (Printer) (CHGDEVPRT) CL command

Configuring PSF by using a device description


To use PSF, you must specify AFP(*YES) in the printer device description.
Other parameters in the device description affect how PSF works with Advanced Function Presentation
(AFP). For example, you can specify these options:
• The maximum number of print requests that can be queued for printers.
• Whether a file using AFP must be completely converted to IPDS before printing begins.
• How long to wait after a print request has been received before forcing the last pages of the output into
the paper stacker. This is for continuous forms printers only.
• A default form definition to use.
• A PSF configuration object to use.

Configuring PSF by using a PSF configuration object


A PSF configuration object is an extension of the printer device description. You can use a PSF
configuration object to specify device configuration options that you cannot specify with the device
description. For example, with a PSF configuration object you can specify these:
• A library list for PSF to use to search for resources
• When PSF should release a session with a printer
• Whether to automatically take advantage of outline fonts
• Whether to generate Portable Document Format (PDF) output from the spooled file
To use a PSF configuration object, follow these steps:
1. Create a PSF configuration object by using the Create PSF Configuration Object (CRTPSFCFG)
command or by using AFP Manager:
a) Start an System i Navigator session.
b) Expand My Connections (or your active environment).
c) Expand AFP Manager.
If you do not have an AFP Manager icon, install AFP Manager as follows: Right-click My
Connections (or your active environment) and select Install Options then Selective Setup.
d) Right-click PSF configurations and select New.
e) Specify the options you want.
For help on any page, press F1. Select OK.
2. Specify the PSF configuration object by following the steps in the “Specifying a PSF configuration
object” on page 45 topic.

Managing PSF
After you configure Print Services Facility (PSF), you can continue to work with your AFP environment.
You can change the PSF configuration object and the printer files as necessary to manage PSF sessions.

64 IBM i: Advanced Function Presentation (AFP)


Enabling IPDS pass-through support
When IPDS pass-through support is enabled for a printer, all eligible files spooled to that printer are
processed without conversion to AFPDS and to printer-specific IPDS.
There are several ways to enable Intelligent Printer Data Stream (IPDS) pass-through support:
• Specify IPDSPASTHR(*YES) in the printer file.
• Specify IPDSPASTHR in the PSF configuration object and specify IPDSPASTHR(*DEVD) in the printer file.
When IPDSPASTHR(*DEVD) is specified, PSF will first check whether IPDSPASTHR is specified in the
printer file's USRDFNDTA parameter. It then checks for a value for IPDSPASTHR in the PSF configuration
object that is specified in the printer device description, if one is specified. If there is no object that is
specified in the printer device description, IPDS pass-through is ignored.
Related concepts
IPDS pass-through
IPDS pass-through allows you to process some SCS and IPDS spooled files more efficiently.
PSF configuration objects
A Print Services Facility (PSF) configuration object lets you specify Intelligent Printer Data Stream (IPDS)
printer customization options that you cannot specify elsewhere.
Specifying a PSF configuration object
Specify a PSF configuration object in the device description for the printer.

Sharing print sessions


You can specify printer-sharing properties on the PSF configuration object. This lets you limit the amount
of time that you have a connection to the printer, control when the session is released, control when a
new session is started, and specify how many times PSF tries to connect to the printer.
Several parameters from the PSF configuration object and device description let you configure Print
Services Facility (PSF) to share sessions with other PSF sessions or ASCII print drivers.
Notes:
1. PSF supports session sharing with TCP/IP-attached printers.
2. PSF supports session sharing with any printer attached to the PSF Direct licensed program.
3. PSF does not support session sharing with APPC-attached printers. If you want to use session sharing
with these printers, either use their TCP/IP support, if available, or attach them to PSF Direct, if
supported.
4. PSF does not support session sharing with twinaxial printers attached to local or remote workstation
controllers. If you want to use session sharing with these printers, check if TCP/IP support is available.
Following are the parameters you need to consider for printer session and dialog sharing.
ACTTMR
Printer device description parameter that specifies how long (in seconds) that PSF waits for a printer
to respond to an activation request. This applies to TCP/IP-attached printers only. PSF uses this timer
only after a session has been opened with the printer.
No timers can influence the length of time that TCP/IP takes to wait for a response to a session start
request. You can specify that PSF tries to start a session again after a failure of the session start
request is detected. To do this, use the PSF configuration object RETRY parameter to specify how
many times PSF should repeat the session start request.
ACTRLSTMR
PSF configuration object parameter that specifies the point at which the Release Timer (RLSTMR) is
activated.
If you are using a non-impact continuous forms printer, do not set the PRTRQSTMR parameter in
the printer device description to *NOMAX. If you set the PRTRQSTMR to *NOMAX, an operator

Advanced Function Presentation (AFP) 65


must perform a manual nonprocess runout (NPRO) at the printer. PSF will not release a session or
Intelligent Printer Data Stream (IPDS) dialog until the last file sent to the printer is printed.
RESTRTMR
PSF configuration object parameter that specifies the amount of time to wait before the printer writer
attempts to reestablish either a session or dialog. For example, if this value is set to 10, PSF activates
the timer as soon as a session or dialog is released. After 10 minutes have elapsed, PSF checks for a
spooled file with a status of RDY. If there is one, PSF tries to start a session or dialog with the printer
in order to print the file. If a spooled file is not ready after the timer expires, PSF waits for a RDY
spooled file to be placed on its output queue before attempting to start a session or dialog.
This timer is ignored if PSF has not been configured to release either a session or dialog. Use the
ACTRLSTMR and RLSTMR parameters to configure PSF to release either a session or dialog.
RETRY
PSF configuration object parameter that specifies the number of additional attempts PSF makes to
establish an APPC or TCP/IP session. When PSF is sharing a PSF directly-attached printer with other
PSF sessions, you might want to set the value to *NOMAX. This specifies that PSF will continue trying
to obtain a session. The default value for the RETRY parameter is 15.
The RETRY parameter is helpful for TCP/IP-attached printers in this situation: You want to share an
AFCCU printer with more than three PSFs. A printer is temporarily unavailable when PSF tries to open
a session with it. You might see this when PSF fails to start a printer session. One example of this is
when PSF issues message PQT3603 with error code 22 or 15. The RETRY parameter specifies that
instead of ending PSF should try again to open a session with the printer. PSF will try to open a session
up to the number of times specified.
RETRYDLY
PSF configuration object parameter that specifies the number of seconds to wait between each
additional attempt to establish a session. This parameter is used only when PSF is using an SNA
attachment. The default value for the RETRYDLY parameter is 90.
RLSTMR
Timer set in the PSF configuration object. Its value is referenced by the ACTRLSTMR parameter. The
default setting is *NOMAX, which means that PSF does not release the session or dialog with the
printer until the writer is ended.
The value specified for parameter RESTRTMR determines when PSF reestablishes a session or a
dialog.
Related concepts
PSF configuration objects
A Print Services Facility (PSF) configuration object lets you specify Intelligent Printer Data Stream (IPDS)
printer customization options that you cannot specify elsewhere.
Specifying a PSF configuration object
Specify a PSF configuration object in the device description for the printer.
Related reference
CL commands for PSF configuration objects
There are several CL commands that you can the commands to use to create, change, display, and delete
a PSF configuration object.
CL commands for device descriptions
There are several CL commands that you can to create or change a printer device description.

Automatic session recovery


PSF can try to resume printing when a session has been unexpectedly ended by a device.
A message is sent to the message queue when Print Services Facility (PSF) is performing automatic
session recovery.
These PSF configuration object parameters support automatic session recovery.

66 IBM i: Advanced Function Presentation (AFP)


AUTOSSNRCY
Automatic session recovery specifies whether PSF tries to resume printing when a session has been
unexpectedly ended by a printer or other network device, such as a router. AUTOSSNRCY(*YES) also
lets you power your printer off and on without ending PSF. If you plan to specify *YES, you should
consider these values for other parameters in the PSF configuration object:
• For a TCP/IP connection, use RETRY or ACKFRQ.
• For an APPC connection, use RETRY, RETRYDLY, or ACKFRQ.
Note: When automatic session recovery takes place, pages might be printed when printing resumes.
ACKFRQ
Acknowledgment frequency specifies the frequency, in pages, with which PSF sends Intelligent
Printer Data Stream (IPDS) acknowledgment requests to a printer. The acknowledgment request
responses from the printer that contains information as to the status of pages that is sent to the
printer. You might want to adjust this value if you are concerned about one of these issues:
• Losing a connection to a printer while spooled files are being printed
• Duplicate pages being printed
More frequent acknowledgment request responses provide more information about pages that have been
printed. However, if you increase the frequency of acknowledgment requests (by specifying a lower
value), you can slow the print process. You might need to experiment with different values in order to find
one that is suitable for your environment.
Related concepts
PSF configuration objects
A Print Services Facility (PSF) configuration object lets you specify Intelligent Printer Data Stream (IPDS)
printer customization options that you cannot specify elsewhere.
Specifying a PSF configuration object
Specify a PSF configuration object in the device description for the printer.
Related reference
CL commands for PSF configuration objects
There are several CL commands that you can the commands to use to create, change, display, and delete
a PSF configuration object.

Disabling offset stacking and edge marking


PSF lets you disable offset stacking on cut-sheet printers and edge mark printing on continuous forms
printers.
This PSF configuration object parameter supports disabling offset stacking and edge marking:
PSFDFNOPT (OFFSTACK)
PSFDFNOPT (OFFSTACK(*YES))
Specifies that there is no change to offset stacking and edge marking. That is, offset stacking
and edge marking occurs between each spooled file. All offset stacking and edge mark changes
specified in the form definition are honored. This is the default.
PSFDFNOPT (OFFSTACK(*NO))
Specifies that no offset stacking or edge marking is done. This includes the offset stacking and
edge marking that is done between spooled files and through the form definition.

Specifying public data authority for directories created by PSF


PSF lets you specify the public data authority for any directories that PSF creates when a mapping
program specifies that PDF files are to be written to the integrated file system. This ability applies to
customer-written PDF mapping programs and to map objects.
This PSF configuration object parameter specifies public data authority:

Advanced Function Presentation (AFP) 67


PSFDFNOPT (PDFDTAAUT)
PSFDFNOPT (PDFDTAAUT(*INDIR))
The authority for the directory to be created is determined by the directory it is to be created in.
The directory immediately preceding the new directory determines the authority.
A directory created in the root (/), QOpenSys, or user-defined file system is assigned the same
public, private and primary group authority, authorization list, and primary group as the directory it
is to be created in.
A directory created in QDLS for a folder defaults to *EXCLUDE for a first level folder. If created in
the second level or greater, the authority of the previous level is used.
The QOpenSys and root (/) file systems use the parent directory Ifs Data Authority value. If the
value *INDIR is specified, then PSF specifies the value *INDIR for the *PUBLIC object authority.
PSFDFNOPT (PDFDTAAUT(*RWX))
The user can change the object and perform basic functions on the object except those limited
to the owner or controlled by object existence (*OBJEXIST), object management (*OBJMGT),
object alter (*OBJALTER) and object reference (*OBJREF) authorities. Read, write, execute (*RWX)
authority provides object operational (*OBJOPR) and all data authorities.
PSFDFNOPT (PDFDTAAUT(*RW))
The user can view and change the contents of an object. Read, write (*RW) authority provides
*OBJOPR and data read (*READ), add (*ADD), update (*UPD) and delete (*DLT) authorities.
PSFDFNOPT (PDFDTAAUT(*RX))
The user can perform basic operations on the object, such as run a program or display the
contents of a file. The user is prevented from changing the object. Read, execute (*RX) authority
provides *OBJOPR and data *READ and execute (*EXECUTE) authorities.
PSFDFNOPT (PDFDTAAUT(*WX))
The user can change the contents of an object and run a program or search a library or directory.
Write, execute (*WX) authority provides *OBJOPR and data *ADD, *UPD, *DLT, and *EXECUTE
authorities.
PSFDFNOPT (PDFDTAAUT(*R))
The user can view the contents of an object. Read (*R) authority provides *OBJOPR and data
*READ authorities.
PSFDFNOPT (PDFDTAAUT(*W))
The user can change the contents of an object. Write (*W) authority provides *OBJOPR and data
*ADD, *UPD, and *DLT authorities.
PSFDFNOPT (PDFDTAAUT(*X))
The user can run a program or search a library or directory. Execute (*X) authority provides
*OBJOPR and data *EXECUTE authorities.
PSFDFNOPT (PDFDTAAUT(*EXCLUDE))
The user cannot access the object. The OBJAUT value must be *NONE, if this special value is
used. The value *NONE is not supported for PDDTAAUT.
If you specify a value for PDDTAAUT that is not supported, PSF issues PQT0038 with reason code 5
and terminates. Message PQT0038 is: "Printer writer writer ended because of an error." Reason code
5 is: "Value not recognized."

Preventing the copying of spooled file attribute USRDFNOPT when


respooling AFP
When the AFP respool function is done, PSF copies the User Defined Option (USRDFNOPT) spooled file
attribute from the original spooled file to the new AFP spooled file. If the original spooled file is split into
multiple respooled files, then each of the respooled files contains the USRDFNOPT spooled file attribute
of the original spooled file. If you want to prevent the User Defined Option from being copied, you can do
so.

68 IBM i: Advanced Function Presentation (AFP)


If you want to prevent User Defined Options from being copied by PSF to the respooled files, you can do
so in a way that is system-wide. Enter the following command.

CRTDTAARA DTAARA(QUSRSYS/QPSFVALS) TYPE(*CHAR) LEN(3) VALUE('NNN') AUT(*USE)

PSF examines the third character of the data area to determine whether USRDFNOPT is copied. If the
value of the third character is 'N', then USRDFNOPT is not copied. If the value is 'Y', any other character, or
the data area does not exist, then PSF copies USRDFNOPT.
If you are currently using the QUSRSYS/QPSFVALS data area for another PSF function and want to turn off
the copying of USRDFNOPT, you can do so by entering the following command.

CHGDTAARA DTAARA(QUSRSYS/QPSFVALS (3 1)) VALUE(N)

If you want to turn on the copying of USRDFNOPT, use the following command.

CHGDTAARA DTAARA(QUSRSYS/QPSFVALS (3 1)) VALUE(Y)

Line and mixed data stream support


Use this information to understand how PSF supports line and mixed data on IBM i.
Special characters control line positioning and fonts. Printer file parameters define the use of special
characters and other printing options.
Related concepts
Line data
Line data is record-oriented readable text.
Mixed data
Mixed data is line data intermixed with AFPDS data.

Special characters used with line data


There are two types of special characters that can be used with line data; carriage control characters (CC)
and table reference characters (TRC).
Carriage control characters affect the data's line positioning. A carriage control character can be
represented as either American National Standard (ANSI) or machine code. You cannot use both ANSI
and machine codes within a single data set. ANSI carriage control is a standard representation that
is used with printers from many different manufacturers. See the American National Standard carriage
control characters topic for the ANSI codes and their functions. Machine code control characters were
defined by IBM; they correspond to channel command words issued by the operating system. See the
Machine code carriage control characters topic for the IBM machine code values and functions.
There are differences in the conventions used by the IBM i operating system for ANSI and machine code
line spacing. The IBM i convention for ANSI handles line spacing and then causes the line to be printed.
The IBM i convention for machine codes causes the line to be printed and then performs the spacing
action.
Table reference characters allow an additional byte at the beginning of a line. The byte indicates which
coded font (specified on the AFPCHARS parameter) is used to print the line. Up to four coded fonts are
specified on the AFPCHARS parameter. The table reference character contains a value of X'F0', X'F1',
X'F2', or X'F3'. The value corresponds to the relative position of the required coded font in the list on
the AFPCHARS parameter. If table reference characters are used, every data record must contain a
table reference character. The printer file parameter Table Reference Characters (TBLREFCHR) specifies
whether table reference characters are in the data.
If carriage control and table reference characters are used with the data, the table reference character
follows the carriage control character. Both special characters precede the data. If carriage control bytes
are not used, the table reference character is the first byte of the data record.

Advanced Function Presentation (AFP) 69


These graphics illustrate the valid forms of line data.

Figure 5. Simple line data

Figure 6. Line data with table reference characters

Figure 7. Line data with carriage control characters

Figure 8. Line data with carriage control characters and table reference characters

Related reference
American National Standard carriage control characters
This topic lists the American National Standard carriage control characters for line or mixed data. It also
describes what each is used for.
Machine code carriage control characters
This topic lists the carriage control characters for line or mixed data in IBM machine code. It also
describes what each character is used for.

Printer file parameters used with line and mixed data


There are several printer file parameters that can be used when working with line and mixed data. These
parameters can all be specified on the Create Printer File (CRTPRTF), Change Printer File (CHGPRTF), and
Override with Printer File (OVRPRTF) CL commands.
AFP characters (AFPCHARS)
This parameter identifies up to four 4-byte coded font names. The 4-byte names are concatenated to
X'0'. The names identify the coded fonts that are needed when table reference characters are used in
line or mixed data.
Control character (CTLCHAR)
This parameter specifies the type of control characters (American National Standards Institute (ANSI)
or machine code) that are in the line or mixed data.
Convert line data (CVTLINDTA)
This parameter specifies whether line data is converted to Advanced Function Presentation data
stream (AFPDS) before the data is spooled. A page definition specifies how the data is formatted.
DBCS character rotation (IGCCHRRTT)
For non-Advanced Function Presentation (AFP) printers, this parameter is used to rotate the double-
byte character set (DBCS) data when line data is transformed to SNA Character Stream (SCS). For AFP
printers, this parameter is ignored. Character rotation can be specified in the page definition.
DBCS characters per inch (IGCCPI)
For non-AFP printers, this parameter specifies the pitch of the DBCS data during transformation from
line data to SCS. DBCS shift-out, shift-in (SOSI) characters cannot be transformed when going to an
Intelligent Printer Data Stream (IPDS) printer. Mixed data cannot be transformed when going to an
SCS or IPDS printer. For AFP printers, this parameter is ignored, as the pitch of the DBCS data is
determined by the selected font.
DBCS SO/SI spacing (IGCSOSI)
This parameter indicates what action should be taken when SOSI characters are found in the data. If
the data is mixed, the SOSI should be taken out and appropriate spaces inserted based on the value
of this keyword.

70 IBM i: Advanced Function Presentation (AFP)


Printer device type (DEVTYPE)
Use this parameter to place line data or mixed data onto the printer spool.
Table reference characters (TBLREFCHR)
This parameter indicates whether table reference characters (TRC) exist in the line or mixed data.
If forms control characters are used with the data, the TRC follows the forms control character, but
precedes the data bytes. If forms control characters are not used, the TRC is the first byte of the data
record. If table reference characters are used, every data record must contain a TRC byte.
User-specified DBCS data (IGCDTA)
This parameter specifies whether the file processes DBCS data. If so, the user of a line or mixed data
file must specify *YES to indicate that there are SOSI characters in the data.
Related reference
Change Printer File (CHGPRTF) CL command
Create Printer File (CRTPRTF) CL command
Override with Printer File (OVRPRTF) CL command

Considerations and restrictions when using line data or mixed data


In order to print line data, you might need to change an application or the printer file to generate control
characters. You must be aware of the ways in which the parameters that specify page definitions and form
definitions interact. You must remember that only a subset of DDS keywords is supported for line data.
You must also remember that the SPOOL(*NO) parameter in the printer file is not valid for either line data
or mixed data.

Application considerations for line data


To use line data, first determine whether your application generates an American National Standard
control character in column 1 of your spooled output. If your application does generate an American
National Standard control character as described, specify CTLCHAR(*FCFC) and DEVTYPE(*LINE) on the
printer file.
If your application does not generate an American National Standard control character in column 1 of
your spooled output, change your application to do so. To change your application, use a language or
application construct (such as a SKIP or SPACE option on a COBOL WRITE statement), or make an RPG
output specification. If your application cannot generate American National Standard control characters,
specify CTLCHAR(*NONE) and DEVTYPE(*LINE) on your printer file. The operating system will use control
information to generate machine code control characters in your data.

Specifying a page definition and form definition for line data


When using line data, you can specify various combinations of DEVTYPE(*LINE), PAGDFN, and FORMDF
parameters on the printer file:
If you specify DEVTYPE(*LINE), PAGDFN and FORMDF
When you print to an Advanced Function Presentation (AFP) printer, Print Services Facility (PSF) uses
the PAGDFN and FORMDF parameters to transform the data to Intelligent Printer Data Stream (IPDS).
When you print to a non-AFP printer, the PAGDFN and FORMDF parameters are ignored. The other
parameters on the printer file are used and the line data is transformed to IPDS or SNA Character
Stream (SCS).
If you specify DEVTYPE(*LINE) and FORMDF (no page definition)
When you print to an AFP printer, an inline page definition is built from the printer file parameters. PSF
uses the form definition and the inline page definition to transform the data to IPDS.
When you print to a non-AFP printer, the FORMDF parameter is ignored. The other printer file
parameters are used and the line data is transformed to IPDS or SCS.

Advanced Function Presentation (AFP) 71


If you specify DEVTYPE(*LINE) and PAGDFN (no form definition)
When you print to an AFP printer, an inline form definition is built from the printer file parameters. PSF
uses the page definition and the inline form definition to transform the data to IPDS.
When you print to a non-AFP printer, the PAGDFN parameter is ignored. The other printer file
parameters are used and the line data is transformed to IPDS or SCS.
If you specify DEVTYPE(*LINE) only (no page definition or form definition)
When you print to an AFP printer, an inline page definition and an inline form definition are built
from the printer file parameters. PSF uses the inline form definition and the inline page definition to
transform the data to IPDS.
When you print to a non-AFP printer, the printer file parameters are used and the line data is
transformed to IPDS or SCS.
If you specify DEVTYPE(*AFPDSLINE)
The support for combinations of DEVTYPE(*AFPDSLINE), PAGDFN, and FORMDF are similar to
DEVTYPE(*LINE) line data. However, you should be aware of these exceptions:
• The spooled file must be printed on an AFP printer. When you send data to a non-AFP printer, the
data cannot be transformed to IPDS or to SCS.
• You are not required to specify a page definition or form definition with *AFPDSLINE data because
they can be built inline. However, certain Advanced Function Presentation data stream (AFPDS)
commands in the data stream (for example, Invoke Medium Map) might reference named structured
fields in the page definition or form definition that do not match those in the inline page definition
and form definition.

Supported DDS keywords for line data


Below is a list of Data description specifications (DDS) keywords that are supported for line data. If you
use DDS keywords that are not included on this list while processing line data, they will be ignored.
• ALIAS
• BLKFOLD
• CCSID
• DATE
• DATFMT
• DATSEP
• DFT
• DLTEDT
• EDTCDE
• EDTWRD
• FLTFIXDEC
• FLTPCN
• IGCALTTYP
• IGCANKCNV
• INDARA
• INDTXT
• INVDTAMAP
• MSGCON
• PAGNBR
• REF
• REFFLD

72 IBM i: Advanced Function Presentation (AFP)


• SKIPA
• SKIPB
• SPACEA
• SPACEB
• TEXT
• TIME
• TIMFMT
• TIMSEP

Printer file restrictions when using line data or mixed data


• Externally described printer files (DDS SUPPORT) support both line and mixed data device types.
• In the printer file, if you specify *LINE or *AFPDSLINE for device type, you cannot specify SPOOL(*NO).
If you specify one of these combinations, Message CPD7341, indicating that the value SPOOL(*NO) is
not valid with device type, is issued.

Sending data from zSeries to IBM i


Use these instructions to receive and print data and resources from zSeries systems to your IBM i.
Communication with the zSeries system is important to determine how the zSeries system sends data to
your IBM i system. When data is sent from a zSeries system to your IBM i system, it can go directly to the
output queue of a designated user ID. Alternatively, it can go into your network files.
Notes:
1. You can send print data to the output queue of a user ID only when your host zSeries RSCS/JES
subsystem is connected to the VM or z/OS bridge on IBM i.
2. To send data to another IBM i or zSeries system, you can use the Send Network Spooled File
(SNDNETSPLF) command.
If you are sending print data, it can be sent directly to an output queue of a specified user ID on the
IBM i. Advanced Function Presentation data stream (AFPDS) data can go to your network files. However,
you must then use the Print Advanced Function Printer Data (PRTAFPDTA) command to put the file on an
output queue. If you are sending resources, the data must go into your network files.
Related concepts
Receiving resources and AFPDS data sent to network files
To make receiving resources and Advanced Function Presentation data stream (AFPDS) data as easy as
possible, you should be aware of these points.
Related tasks
Receiving AFP resources from another system
When you receive Advanced Function Presentation (AFP) resource data from an operating system other
than IBM i, you typically cannot change the resource. If you want to change the resource, it must be
changed on the originating operating system and then resent to IBM i.

Sending print data from VM to the output queue of a user ID


The examples in this topic show two ways to send print data from VM to an IBM i output queue.
A z/VM® can issue a PRINT or a PSF command to place a file directly into an IBM i user's output queue.
Note: By using the code examples, you agree to the terms of the “Code license and disclaimer
information” on page 93.

Advanced Function Presentation (AFP) 73


Example: Using the PRINT command
These commands place the file REPORTS LETTER A into the output queue of USERONE on IBM i with the
node ID AS4002.

CP TAG DEV PRT AS4002 USERONE


CP SPOOL PRT TO RSCS COPY 1
PRINT REPORTS LETTER A (NOCC

These commands place the file REPORTS LISTING A into the output queue of USERONE on IBM i with
the node ID AS4002.

CP TAG DEV PRT AS4002 USERONE


CP SPOOL PRT RSCS COPY 1
PRINT REPORTS LISTING A

Example: Using the PSF command


These commands place the line data spooled file into an IBM i. They use these variables:
Spooled file name:
reports letter a
User ID that owns the output queue:
userone
Target node ID:
is002
A page definition will be used when the data is printed. When using the PSF command, you must place
the characters P1 in front of the page definition name. When using a form definition, you must place
the characters F1 in front of the form definition name. This example uses a page definition named
P1MYFORM.

TAG DEV PRT is002 userone


SPOOL PRT TO RSCS COPY 1
PSF reports letter a (PAGEDEF (P1MYFORM RESOURCE A))

Sending print data from z/OS to an IBM i output queue


The example in this topic shows how to use JCL commands to send print data from z/OS to IBM i.
These commands, when issued by z/OS, place the Advanced Function Presentation data stream (AFPDS)
spooled file into the output queue of the specified user on IBM i. These commands are job control
language (JCL) commands. Do not place a P1 (for PAGEDEF) or an F1 (for FORMDEF) in the instructions.
In the following example, a form definition named MYFORM is used. The user is userone and the node
name is is002.

//INSTR PROC NODE='is002',USER='userone'


INFILE='dept265.userx.files(report)'
//SPOOL EXEC PGM=IEBGENER
//MYOUT OUTPUT DEST=NODE..USER,
COPIES=1,
FORMDEF=MYFORM
//SYSPRINT DD SYSOUT=*
//SYSIN DD DUMMY
//SYSUT1 DD DSN=&,DISP=SHR,DCB=(RECFM=FBA);
//SYSUT2 DD SYSOUT=A,OUTPUT=*.MYOUT
// PEND
//STEP01 EXEC PROC=INSTR

Note: By using the code examples, you agree to the terms of the “Code license and disclaimer
information” on page 93.

74 IBM i: Advanced Function Presentation (AFP)


Sending data from zSeries to IBM i network files
The examples in this topic show how to send print data and resources from a zSeries system to an IBM i
network file.
Advanced Function Presentation (AFP) resources sent from an a zSeries system to an IBM i system must
be sent to network files.
Note: AFP data can also be sent to network files. However, this is not the recommended way to send
this data to an IBM i system. If you choose this method, you must use the Print Advanced Function
Presentation Data (PRTAFPDTA) command to put the file on an output queue.

Sending resources and AFPDS data from VM to network files


When issued by a VM system, this command places the specified file into the network files of userone on
an IBM i system named is002.

SENDFILE fonts resource a TO userone AT is002

Sending resources and AFPDS data from z/OS to network files


When issued by a z/OS system, this command places the specified file into a user's network files. The
user is userone and the IBM i system is named is002.

TRANSMIT is002.userone DSNAME('system.afp.resources(font)')

Related concepts
Receiving fonts from zSeries
Fonts can be downloaded to IBM i from zSeries systems.
Related tasks
Printing data sent to IBM i from zSeries
PSF can print data that was generated on zSeries. This data might be AFP, AFPDSLINE (AFP data mixed
with line data), or line data. The data might be sent to network files or directly to an output queue.
Receiving AFP resources from another system
When you receive Advanced Function Presentation (AFP) resource data from an operating system other
than IBM i, you typically cannot change the resource. If you want to change the resource, it must be
changed on the originating operating system and then resent to IBM i.
Related reference
zSeries parameters and corresponding IBM i printer file parameters
This topic briefly describes the zSeries printer parameters used on VM commands and z/OS JCL
statements and indicates the equivalent IBM i printer file parameters.

AFP reference information


Look up information about PSF, such as the form definitions and page definitions included with your
system, here.
This topic contains additional reference materials related to Advanced Function Presentation (AFP)
printing.
Related concepts
Printer file parameter considerationsThis topic provides more detailed information about certain printer
file parameters.
DDS for printer filesThis topic describes how to code the data description specifications (DDS) for printer
files.
Related reference
Printing-related CL commandsThis topic lists CL commands that are related to printing.

Advanced Function Presentation (AFP) 75


Form definitions included with the operating system
This topic lists the form definitions that are provided with IBM i in library QSYS.

Table 2. IBM-supplied form definitions


Across Down
Name (inches) (inches) Presentation Direction Bin Duplex
F1A10110 1/6 1/6 Portrait Across 1 No
F1A10111 1/6 1/6 Portrait Across 1 Yes
F1A10112 1/6 1/6 Portrait Across 1 Tumble
F1A10120 1/6 1/6 Portrait Across 2 No
F1A10121 1/6 1/6 Portrait Across 2 Yes
F1A10122 1/6 1/6 Portrait Across 2 Tumble
F1C10110 1/6 1/6 Landscape Down 1 No
F10101LA 0 1/2 Landscape Across 1 No
F10101LD 0 1/2 Landscape Down 1 No
F10101PA 0 1/2 Portrait Across 1 No
F10101PD 0 1/2 Portrait Down 1 No
F1OGL 0 0 Portrait Across 1 No

Note: The IBM-supplied form definitions do not set the print quality for the 4224, 4230, 4234, and 4247
printers. You must set the print quality on the printer operator panel when using an IBM-supplied form
definition.

Related concepts
Form definitions
A form definition is an Advanced Function Presentation (AFP) resource object that defines the
characteristics of the physical form to be printed on.
Page segments
Page segments are objects containing composed text and images that are prepared before formatting and
included during printing.

Page definitions included with the operating system


This topic lists the page definitions that are provided with IBM i in library QSYS.

Table 3. IBM-supplied page definitions


Name Size of form Orientation on page Description
P1A06462 8.5 x 11.0 inches Portrait Letter size. 6 lines per
inch (LPI). 64 lines per
page.
P1A08584 1 9.5 x 11.0 inches Portrait Continuous forms. 8 lines
per inch (LPI). 85 lines per
page.
P1A08682 8.5 x 11.0 inches Portrait Letter size. 8 lines per
inch (LPI). 86 lines per
page.

76 IBM i: Advanced Function Presentation (AFP)


Table 3. IBM-supplied page definitions (continued)
Name Size of form Orientation on page Description
P1B04963 8.5 x 14.0 inches Portrait Legal size. 6 lines per inch
(LPI). 82 lines per page.
P1B08262 8.5 x 14.0 inches Portrait Legal size. 6 lines per inch
(LPI). 82 lines per page.
P1B11082 8.5 x 14.0 inches Portrait Legal size. 8 lines per inch
(LPI). 110 lines per page.
P1B06683 14.0 x 8.5 inches Landscape Legal size. 8 lines per inch
(LPI). 66 lines per page.
P1C09182 8.27 x 11.69 inches Portrait Legal size. 8 lines per inch
(LPI). 91 lines per page.
P1D08083 14.33 x 10.12 inches Landscape B4 Size forms. 8 lines per
inch (LPI). 80 lines per
page.
P1D08462 14.33 x 10.12 inches Landscape B4 size forms. 6 lines per
inch (LPI). 84 lines per
page.
P1D11382 10.12 x 14.33 inches Portrait B4 Size forms. 8 lines per
inch (LPI). 113 lines per
page.
P1J04964 1 12.0 x 8.5 inches Landscape Continuous forms. 6 lines
per inch (LPI). 49 lines per
page.
P1J06484 1 12.0 x 8.5 inches Landscape Continuous forms. 8 lines
per inch (LPI). 64 lines per
page.
P1L06464 1 14.88 x 11.0 inches Landscape Continuous forms. 6 lines
per inch (LPI). 64 lines per
page.
P1L08584 1 14.88 x 11.0 inches Landscape Continuous forms. 8 lines
per inch (LPI). 85 lines per
page.
P1V04863 8.27 x 11.00 inches Portrait Combined letter and A4
size forms. 6 lines per
inch (LPI). 48 lines per
page.
P1V06483 8.27 x 11.00 inches Portrait Combined letter and A4
size forms. 8 lines per
inch (LPI). 64 lines per
page.
P1V06683 8.27 x 11.00 inches Portrait Combined letter and A4
size forms. 8 lines per
inch (LPI). 66 lines per
page.

Advanced Function Presentation (AFP) 77


Table 3. IBM-supplied page definitions (continued)
Name Size of form Orientation on page Description
P1W120C2 8.27 x 11.00 inches Portrait Combined letter and A4
size forms using MULTIUP.
12 lines per inch. 120
lines printed per page. 2
logical pages printed on
one physical page.
P1W12883 8.27 x 11.00 inches Portrait Combined letter and A4
size forms using MULTIUP.
8 lines per inch. 128
lines printed per page. 2
logical pages printed on
one physical page.
P1W240F3 8.27 x 11.00 inches Portrait Combined letter and A4
size forms using MULTIUP.
15 lines per inch. 240
lines printed per page. 4
logical pages printed on
one physical page.
1

Can only be used with the 4224, 4230, 4234, and 4247 printers.

Related concepts
Page definitions
Page definitions are resources that format and compose line data into logical pages.

CL commands for PSF configuration objects


There are several CL commands that you can the commands to use to create, change, display, and delete
a PSF configuration object.
The following table provides a brief description of each command. For information about specific
parameters of the configuration object, see the online help. You can also use the AFP Manager component
of System i Navigator to create, change, and delete a PSF configuration object.

Table 4. CL commands for PSF configuration objects


Command Description
Change PSF Configuration This command changes the PSF configuration object in the library
(CHGPSFCFG) specified on the command.
Create PSF Configuration This command lets you specify additional parameters for an Advanced
(CRTPSFCFG) Function Presentation (AFP) printer that are not supported in the
Create Device Description (Printer) (CRTDEVPRT) command.
Delete PSF Configuration This command deletes a PSF configuration object from a specified
(DLTPSFCFG) library. If the PSF configuration object is found, it is deleted. If it
is not found, a message is sent to the user indicating that the PSF
configuration object cannot be found.
Display PSF Configuration This command lets you display or print the contents of a PSF
(DSPPSFCFG) configuration object.
Work with PSF Configuration This command lets the user work with all of the PSF configuration
(WRKPSFCFG) objects from the system libraries or the user libraries.

78 IBM i: Advanced Function Presentation (AFP)


Related reference
Sharing print sessions
You can specify printer-sharing properties on the PSF configuration object. This lets you limit the amount
of time that you have a connection to the printer, control when the session is released, control when a
new session is started, and specify how many times PSF tries to connect to the printer.
Automatic session recovery
PSF can try to resume printing when a session has been unexpectedly ended by a device.
Change PSF Configuration (CHGPSFCFG) CL command
Create PSF Configuration (CRTPSFCFG) CL command
Delete PSF Configuration (DLTPSFCFG) CL command
Display PSF Configuration (DSPPSFCFG) CL command
Work with PSF Configuration (WRKPSFCFG) CL command

CL commands for device descriptions


There are several CL commands that you can to create or change a printer device description.
The following table provides a brief description about each command. For information about specific
parameters of the configuration object, see the online help.

Table 5. CL commands for device descriptions


Command Description
Change Device Description This command lets you change a device description for a printer
(Printer) (CHGDEVPRT) device. Before you change a printer device description, it is
recommended that you do these:
• End the printer writer with the End Writer (ENDWTR) command.
• Vary off the printer device with the Work with Configuration Status
(WRKCFGSTS) command.

Create Device Description This command lets you create a device description for a printer
(Printer) (CRTDEVPRT) device. If you have a locally-attached Twinax device and the automatic
configuration (QAUTOCFG) system value is *YES, the system will create
printer device descriptions automatically.
Delete Device Description This command deletes a device description.
(DLTDEVD)
Display Device Description This command lets you display or print the contents of a device
(DSPDEVD) description.
Work with Device Descriptions This command lets a user display and work with device descriptions.
(WRKDEVD)

Related reference
Sharing print sessions
You can specify printer-sharing properties on the PSF configuration object. This lets you limit the amount
of time that you have a connection to the printer, control when the session is released, control when a
new session is started, and specify how many times PSF tries to connect to the printer.
Change Device Description (Printer) (CHGDEVPRT) CL command
Create Device Description (Printer) (CRTDEVPRT) CL command
Delete Device Description (DLTDEVD) CL command
Display Device Description (DSPDEVD) CL command
Work with Device Descriptions (WRKDEVD) CL command

Advanced Function Presentation (AFP) 79


zSeries parameters and corresponding IBM i printer file parameters
This topic briefly describes the zSeries printer parameters used on VM commands and z/OS JCL
statements and indicates the equivalent IBM i printer file parameters.
Be aware of these special considerations when working with these zSeries (VM and z/OS) parameters:
FCB
If you specify the FCB parameter on VM or z/OS, IBM i uses the printer file of that name. IBM i uses
the library list of the user receiving the spooled file to find the printer file. If the FCB parameter is not
specified, the IBM i printer file QSYSPRT is used.
BIN and DUPLEX
The values for the DRAWER and DUPLEX parameters are taken from the printer file specified in the
FCB parameter if both of these are true:
• The BIN and DUPLEX parameter values are not specified from VM and z/OS
• The form definition is not specified from VM or z/OS
If the FCB parameter is not specified, the DRAWER and DUPLEX values are set to *FORMDEF. This
means that the values are taken from the form definition.
FORMDEF
If the form definition (FORMDEF) parameter is not specified from VM or z/OS, the IBM i form definition
parameter is set to *DEVD, and *LIBL is used for the library. *DEVD means that the form definition
used is the one specified in the device description for the printer you want to use.
These zSeries parameters are supported when a zSeries user sends data directly to the output queue of a
user on IBM i.
The zSeries parameter is ignored when the data is printed on IBM i when both of these are true:
• The zSeries printer parameter is not one that is specified in this table.
• No matching or equivalent IBM i printer file parameter exists.

Table 6. VM parameters
zSeries printer IBM i printer file
parameter VM commands Function parameter
BIN PSF Specifies which drawer DRAWER
to take the paper from.
CC PRINT, PSF Specifies control CTLCHAR1
characters.
CHARS SPOOL Specifies a table of AFPCHARS
coded fonts.
COPY SPOOL Specifies the number of COPIES
copies.
DATACK PSF Specifies whether
the printer blocks
print positioning and
incorrect character
errors. Printers will
always block these
unless the printer file
that is used to create
the spooled file specifies
*ABSOLUTE for fidelity.
DEST TAG Specifies node and user
ID.

80 IBM i: Advanced Function Presentation (AFP)


Table 6. VM parameters (continued)
zSeries printer IBM i printer file
parameter VM commands Function parameter
DUPLEX PSF Specifies whether DUPLEX
duplex printing is used.
FCB SPOOL, TAG Specifies the printer file FILE
used.
FORM SPOOL Specifies the form type FORMTYPE
used.
FORMDEF PSF Specifies the form FORMDF
definition used.
PAGEDEF PSF Specifies the page PAGDFN
definition used.
PRMODE2 PSF Specifies the device DEVTYPE, IGCDTA,
type, double-byte IGCSOSI
character data,
processing shift-out,
shift-in characters.
TRC PRINT, PSF Specifies whether the TBLREFCHR
data stream contains
table reference codes.
1 To correctly print zSeries line data with first-character forms control, each channel value specified in
the CTLCHAR parameter must have a unique line number associated with that channel value.
2Only PRMODE values of PAGE, LINE, SOSI1, SOSI2, and SOSI3 are supported. The supported PRMODE
values translate to device types of *AFPDS, *LINE, or *AFPDSLINE. See Network Job Entry Formats and
Protocols for more specific information.

Table 7. z/OS parameters


zSeries printer IBM i printer file
parameter z/OS JCL statements Function parameter
CHARS DD, OUTPUT Specifies a table of AFPCHARS
coded fonts.
CONTROL OUTPUT Specifies line spacing
COPIES DD, OUTPUT Specifies the number of COPIES
copies.
DATACK OUTPUT Specifies whether
the printer blocks
print positioning and
incorrect character
errors. Printers will
always block these
unless the printer file
that is used to create
the spooled file specifies
*ABSOLUTE for fidelity.
DCB=RECFM DD Specifies control CTLCHAR1
characters.

Advanced Function Presentation (AFP) 81


Table 7. z/OS parameters (continued)
zSeries printer IBM i printer file
parameter z/OS JCL statements Function parameter
DEST DD, OUTPUT Specifies node and user
ID.
FCB DD, OUTPUT Specifies the printer file FILE
used.
FORMDEF OUTPUT Specifies the form FORMDF
definition used.
FORMS OUTPUT Specifies the form type FORMTYPE
used.
PAGEDEF OUTPUT Specifies the page PAGDFN
definition used.
PRMODE2 OUTPUT Specifies the device DEVTYPE, IGCDTA,
type, double-byte IGCSOSI
character data,
processing shift-out,
shift-in characters.
TRC OUTPUT Specifies whether the TBLREFCHR
data stream contains
table reference codes.
1 To correctly print zSeries line data with first-character forms control, each channel value specified in
the CTLCHAR parameter must have a unique line number associated with that channel value.
2Only PRMODE values of PAGE, LINE, SOSI1, SOSI2, and SOSI3 are supported. The supported PRMODE
values translate to device types of *AFPDS, *LINE, or *AFPDSLINE. See Network Job Entry Formats and
Protocols for more specific information.

Related concepts
Sending data from zSeries to IBM i network files
The examples in this topic show how to send print data and resources from a zSeries system to an IBM i
network file.
Related information
Network Job Entry Formats and Protocols PDF

American National Standard carriage control characters


This topic lists the American National Standard carriage control characters for line or mixed data. It also
describes what each is used for.

Table 8. American National Standard carriage control characters and their functions
Control character value
(in hexadecimal) Function
X'40' (blank) Space one line, and then print (single spacing).
X'F0' (zero) Space two lines, and then print (double spacing).
X'60' (dash) Space three lines, and then print (triple spacing).
X'4E' (plus sign) Suppress spacing, and then print (type over previous line).

82 IBM i: Advanced Function Presentation (AFP)


Table 8. American National Standard carriage control characters and their functions (continued)
Control character value
(in hexadecimal) Function
X'F1' Print the data at the line position defined as Channel 1 (by convention, the
first line on a new page).
X'F2' Print the data at the line position defined as Channel 2.
X'F3' Print the data at the line position defined as Channel 3.
X'F4' Print the data at the line position defined as Channel 4.
X'F5' Print the data at the line position defined as Channel 5.
X'F6' Print the data at the line position defined as Channel 6.
X'F7' Print the data at the line position defined as Channel 7.
X'F8' Print the data at the line position defined as Channel 8.
X'F9' Print the data at the line position defined as Channel 9.
X'C1' Print the data at the line position defined as Channel 10.
X'C2' Print the data at the line position defined as Channel 11.
X'C3' Print the data at the line position defined as Channel 12.

Note: When American National Standard carriage controls are used, only the values that appear in
this table are considered valid by Print Services Facility (PSF). PSF treats any other American National
Standard carriage control value as not valid and uses single spacing to print any data on the line.

Related concepts
Special characters used with line data
There are two types of special characters that can be used with line data; carriage control characters (CC)
and table reference characters (TRC).

Machine code carriage control characters


This topic lists the carriage control characters for line or mixed data in IBM machine code. It also
describes what each character is used for.

Table 9. Carriage control characters in IBM machine code and their functions
Control character value
(in hexadecimal) Function
X'03' No operation.
X'09' Print, and then space one line (single spacing).
X'11' Print, and then space two lines (double spacing).
X'19' Print, and then space three lines (triple spacing).
X'01' Print without spacing.
X'89' Print the data, then skip to the line position defined as Channel 1 (by
convention, the first line on a new page).
X'91' Print the data, then skip to the line position defined as Channel 2.
X'99' Print the data, then skip to the line position defined as Channel 3.
X'A1' Print the data, then skip to the line position defined as Channel 4.

Advanced Function Presentation (AFP) 83


Table 9. Carriage control characters in IBM machine code and their functions (continued)
Control character value
(in hexadecimal) Function
X'A9' Print the data, then skip to the line position defined as Channel 5.
X'B1' Print the data, then skip to the line position defined as Channel 6.
X'B9' Print the data, then skip to the line position defined as Channel 7.
X'C1' Print the data, then skip to the line position defined as Channel 8.
X'C9' Print the data, then skip to the line position defined as Channel 9.
X'D1' Print the data, then skip to the line position defined as Channel 10.
X'D9' Print the data, then skip to the line position defined as Channel 11.
X'E1' Print the data, then skip to the line position defined as Channel 12.
X'0B' Space one line without printing.
X'13' Space two lines without printing.
X'1B' Space three lines without printing.
X'8B' Skip to Channel 1 immediately (by convention, the first line on a new page).
X'93' Skip to the Channel 2 position immediately.
X'9B' Skip to the Channel 3 position immediately.
X'A3' Skip to the Channel 4 position immediately.
X'AB' Skip to the Channel 5 position immediately.
X'B3' Skip to the Channel 6 position immediately.
X'BB' Skip to the Channel 7 position immediately.
X'C3' Skip to the Channel 8 position immediately.
X'CB' Skip to the Channel 9 position immediately.
X'D3' Skip to the Channel 10 position immediately.
X'DB' Skip to the Channel 11 position immediately.
X'E3' Skip to the Channel 12 position immediately.

Note: Print Services Facility (PSF) ignores these hexadecimal machine code carriage control characters
and does not print lines containing them: X'02' through X'07', X'0A', X'12', X'23', X'43', X'63', X'6B', X'73',
X'7B', X'EB', X'F3', and X'FB'. PSF treats any other carriage control value as not valid and prints any data
on the line using single spacing.

Related concepts
Special characters used with line data

84 IBM i: Advanced Function Presentation (AFP)


There are two types of special characters that can be used with line data; carriage control characters (CC)
and table reference characters (TRC).

Troubleshooting mapping problems


There are several ways to help you troubleshoot your PDF mapping programs.

Error message reason codes


The reason codes returned with error messages PQT4140 and PQT4151 can identify problems with PSF
mapping programs.

The diagnostic spool file (PSFTRACE)


The diagnostic spooled file contains in-depth information about your mapping program. Use it with
the reason code issued with message PQT4140 or PQT4151 to diagnose problems with your mapping
program.
PSF automatically produces a spooled file called PSFTRACE whenever message PQT4140 or PQT4151 is
issued, except when the reason code is 15 for PQT4140. The PSFTRACE spooled file lists the fields that
PSF finds to be in error. You might get several diagnostic spooled files if there are several errors in the
mapping program.
You can also request PSF to write a PSFTRACE spooled file that lists only the fields used by your mapping
program. If you request a PSFTRACE spooled file and PSF also finds errors, it writes one spooled file with
both sets of information: first the user-requested information and then the error information.
To find PSFTRACE, use the command WRKSPLF QSPLJOB. The spooled file has the same job number
as the PDJ job (one of the three PSF jobs). If a file is respooled or segments within a spooled file are
processed and the mapping program is called, the PSFTRACE dump of the mapping program interface is
generated for the WTR job. Check for PSFTRACE after the writer has ended.

Requesting the diagnostic spool file


You can request PSF to write information passed to and received from a mapping program to a diagnostic
spooled file called PSFTRACE.
To request the PSFTRACE file:
1. Create a data area. Enter this command:

CRTDTAARA DTAARA(QGPL/printer_device_name) TYPE(*CHAR) LEN(40) AUT(*ALL)


VALUE(X'E6E6D7C4E3D9C8D98000000000000800000000000000000032000000000000000000000000000000')

• The data area must be created before starting the printer writer.
• The data area must be created in QGPL.
• The name of the data area must match that of the printer device description being used for printing.
2. To verify the value in the data area, display the data area using *HEX representation:
DSPDTAARA DTAARA(QGPL/printer_device_name) OUTFMT(*HEX)
The data area must look like this:

E6E6D7C4E3D9C8D9800000000000080000000000
0000000032000000000000000000000000000000

The first eight characters of the value of the data area must be WWPDTRHR.
3. When you no longer need the PSFTRACE file, delete the data area. Enter this command:
DLTDTAARA DTAARA(QGPL/printer_device_name)

Advanced Function Presentation (AFP) 85


Format of the diagnostic spool file
The first eight characters of each line in the diagnostic spooled file (PSFTRACE) describe the data that
follows, except for lines that continue actual input or output data. Each line except data continuation lines
has a time stamp.
If a keyword is marked (hex offset), when the data following that keyword is hexadecimal, the
hexadecimal offset of the data appears on the left. You can use these hexadecimal offsets to find specific
fields.
The keywords that describe data are:
AFP OUTQ (hex offset)
Spooled File AFPDS Distribution format.
ATTACH (hex offset)
Attachments.
BCC (hex offset)
The specified BCC e-mail address.
BODY FIL (hex offset)
Body files.
CC (hex offset)
The specified CC e-mail address.
DIR PATH
The specified directory for files.
EXT AREA
Extension Area format.
INPUT (hex offset)
Mapping Program Input information format.
ISF FORM
Individual Stream File Information format.
MAP OBJ
The name of the PDF map object, if used.
MAP PGM
The library-qualified name of the mapping program.
MSG TEXT (hex offset)
Message text specified at an offset.
OFFSET
The offset at which the field in error is found in the mapping program. This value is written in decimal
and hexadecimal.
OUTPUT (hex offset)
Mapping Program Output format.
PDF MAIL (hex offset)
The name of a PDF file attached to e-mail.
PDF OUTQ (hex offset)
Spooled File PDF Distribution format.
PUB AUT (hex offset)
The public authority of a PDF file written to the integrated file system.
QPQMAPEX, followed by a time stamp and then SN:
The value shown here is the sequence number of the PDF map entry used.
RC
The reason code from message PQT4140 or PQT4151. If the reason code is AA, FF or GG, a user
requested this spooled file:

86 IBM i: Advanced Function Presentation (AFP)


AA
The spooled file was written by the WTR job. Map programs requesting the respooling of AFP are
called at this point.
FF
The spooled file was written by the PDJ job. Map programs are always called at this point.
GG
The spooled file was written by the WTR job. Map programs are called at this point when
segments within a spooled file are processed. If a spooled file contains segments, PSF processes
them when a PSF configuration object specifies PDFMULT(*YES *SPLIT).
RELEASE
The release of the operating system on which the trace was taken.
REPLYTO (hex offset)
The specified REPLYTO e-mail address.
SENDER
The sender of the e-mail.
SF FORM
Stream File format.
STMF (hex offset)
The name of the PDF file written to integrated file system.
SUBJECT (hex offset)
The subject of the e-mail.
TO (hex offset)
The specified TO e-mail address.
USR VALU
The value specified in the mapping program. Depending upon the field, this value can be either
character or numeric (decimal and hexadecimal).
VALID
The valid values for the field in error.
Note: Formats (such as Spooled File AFPDS Distribution format) correspond to values in the mapping
program template. For more information about any of these formats, see Infoprint Server for iSeries User's
Guide.

Automatically generated PSFTRACE file


This is an example of a diagnostic spooled file (PSFTRACE) that PSF created because it detected an error
in the mapping program.
The diagnostic spooled file contains this information:
• The name of the mapping program is QPQMAPEXIT. It is in library QSYS.
• The name of the map object is TEMA1. It is in library QGPL.
• The release on which this trace was taken is V6R1M0.
• The reason code issued with error message PQT4140 is 9, "When using SNDDST, all fields for specifying
ReplyTo, CC, BCC, body files, attachments, and directory names must be 0."
• The input to the mapping program (Mapping Program Input Information format) is presented in
hexadecimal representation. At the end of each line is the EBCDIC representation of the input. Not
all characters can be displayed. Characters that cannot be displayed are represented by a period ( . ).
• An error was found in the mapping program in the Extension Area format at offset 00000012 (decimal)
or 0000000C (hexadecimal). The value in that field is 00000448 (decimal) or 000001C0 (hexadecimal).
To determine what field that is in the mapping program and what the appropriate values are, see the
Mapping Program appendix in the Infoprint Server for iSeries User's Guide. In this case, the field is Offset
to ReplyTo e-mail address. It has a value of 448 (decimal).
• Ten errors were found. Each error starts with the text OFFSET.

Advanced Function Presentation (AFP) 87


• The valid value for all of these fields is 0.
• The output from the mapping program (Mapping Program Output format) is presented in hexadecimal
representation. At the end of each line is the EBCDIC representation of the input. Not all characters can
be displayed. Characters that cannot be displayed are represented by a period ( . ).
• The output from the Extension Area format is presented in hexadecimal representation. At the end of
each line is the EBCDIC representation of the input. Not all characters can be displayed. Characters that
cannot be displayed are represented by a period ( . ).

******** 10:59:17.724 ****************************************


MAP PGM 10:59:17.724 QSYS QPQMAPEXIT
MAP OBJ 10:59:17.724 QGPL TEMA1
RELEASE 10:59:17.725 V6R1M0
RC 10:59:17.725 09
INPUT 10:59:17.725
000000 C4D3E3C4 C9D94040 4040D1D2 D3C1D940 40404040 F0F7F1F8 F1F4C4D3 E3C4C9D9 DLTDIR....JKLAR.....071814DLTDIR
000020 40404040 00000001 40404040 40404040 40404040 40404040 40404040 40404040 ................................
000040 40404040 40404040 40404040 40404040 40404040 40404040 40404040 40404040 ................................
000060 40404040 40404040 40404040 40404040 40404040 40404040 40404040 40404040 ................................
000080 40404040 40404040 40404040 40404040 40404040 40404040 40404040 40404040 ................................
0000A0 40404040 40404040 40404040 40404040 40404040 40404040 40404040 40404040 ................................
0000C0 40404040 40404040 40404040 40404040 40404040 40404040 40404040 40404040 ................................
0000E0 40404040 40404040 40404040 40404040 40404040 40404040 40404040 40404040 ................................
000100 40404040 40404040 40404040 40404040 40404040 40404040 40404040 40404040 ................................
000120 404061D7 E2C6F4F0 F061F0F7 F1F9F7F0 61C4D3E3 C4C9D961 D1D2D3C1 D961F0F7 ../PSF400/071970/DLTDIR/JKLAR/07
000140 F1F8F1F4 6DF0F0F0 F0F0F16D C4D3E3C4 C9D96DF0 F7F3F1F2 F0F0F96D F0F0F0F0 1814_000001_DLTDIR_07312009_0000
000160 F0F14BD7 C4C64040 40404040 40404040 40404040 40404040 40404040 40404040 01.PDF..........................
000180 40404040 40404040 40404040 40404040 40404040 40404040 40404040 40404040 ................................
0001A0 40404040 40404040 40404040 40404040 40404040 40404040 40404040 40404040 ................................
0001C0 40404040 40404040 40404040 40404040 40404040 40404040 40404040 40404040 ................................
0001E0 40404040 40404040 40404040 40404040 40404040 40404040 40404040 40404040 ................................
000200 40404040 40404040 40404040 40404040 40404040 40404040 40404040 40404040 ................................
000220 40404040 40404040 40404040 40404040 40404040 40404040 40404040 40404040 ................................
000240 40404040 40404040 40404040 40404040 40404040 40404040 40404040 40404040 ................................
000260 40404040 40404040 40404040 40404040 40404040 4040F140 0000FFFF D1D2D3C1 ......................1.....JKLA
000280 D9404040 40404040 40404040 40404040 C2D3C4C1 E2F6F140 912ED0B5 92E8C001 R...............BLDAS61.j...kY..
0002A0 D1D2D7C4 C6404040 4040D8E4 E2D9E2E8 E2404040 E3C5D4C1 F1404040 4040D8C7 JKPDF.....QUSRSYS...TEMA1.....QG
0002C0 D7D34040 40404040 5CE2E3C4 40404040 4040 PL......*STD......
OFFSET 11:05:39.349 EXT AREA 00000012 HEX: 0000000C
USR VALU 11:05:39.349 00000448 HEX: 000001C0
OFFSET 11:05:39.349 EXT AREA 00000016 HEX: 00000010
USR VALU 11:05:39.349 00000021 HEX: 00000015
OFFSET 11:05:39.349 EXT AREA 00000020 HEX: 00000014
USR VALU 11:05:39.349 00000000 HEX: 00000000
OFFSET 11:05:39.349 EXT AREA 00000024 HEX: 00000018
USR VALU 11:05:39.349 00000000 HEX: 00000000
OFFSET 11:05:39.349 EXT AREA 00000028 HEX: 0000001C
USR VALU 11:05:39.349 00000000 HEX: 00000000
OFFSET 11:05:39.349 EXT AREA 00000032 HEX: 00000020
USR VALU 11:05:39.349 00000000 HEX: 00000000
OFFSET 11:05:39.349 EXT AREA 00000036 HEX: 00000024
USR VALU 11:05:39.349 00000000 HEX: 00000000
OFFSET 11:05:39.349 EXT AREA 00000040 HEX: 00000028
USR VALU 11:05:39.349 00000000 HEX: 00000000
OFFSET 11:05:39.349 EXT AREA 00000044 HEX: 0000002C
USR VALU 11:05:39.349 00000000 HEX: 00000000
OFFSET 11:05:39.349 EXT AREA 00000048 HEX: 00000030
USR VALU 11:05:39.349 00000000 HEX: 00000000
VALID 11:05:39.357 0
OUTPUT 11:05:39.357
000000 F1F00000 000000FF 0000001C D7938581 A2854099 85818440 A38889A2 40998597 10..........Please.read.this.rep
000020 9699A340 82A840F1 F540C1A4 87A4A2A3 40404040 40404040 40404040 40404040 ort.by.15.August................
000040 40404040 40404040 40404040 40404040 40404040 40404040 40404040 40404040 ................................
000060 40404040 40404040 40404040 40404040 40404040 40404040 40404040 40404040 ................................
000080 40404040 40404040 40404040 40404040 40404040 40404040 40404040 40404040 ................................
0000A0 40404040 40404040 40404040 40404040 40404040 40404040 40404040 40404040 ................................
0000C0 40404040 40404040 40404040 40404040 40404040 40404040 40404040 40404040 ................................
0000E0 40404040 40404040 40404040 40404040 40404040 40404040 40404040 40404040 ................................
000100 40404040 40404040 404040F1 0000013B 00000000 F0F0F0F0 00000000 000000 ...........1........0000.......
EXT AREA 11:05:39.357
000000 00000070 000001AB 00000015 000001C0 00000015 00000000 00000000 00000000 ................................
000020 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 ................................
000040 00000000 00000000 00000000 00000000 00000000 00000000 00000000 000001D5 ...............................N
000060 00000047 00000000 00000000 0000F0F0 ..............00
******** 10:59:17.744 ****************************************

User-requested PSFTRACE file


This is an example of a diagnostic spooled file (PSFTRACE) that PSF created because a user requested it.
The user-requested diagnostic spooled file contains only the information specified by a mapping program.
In this example, a mapping program specifies almost all distribution options. All data is presented in
hexadecimal representation. At the end of each line is the EBCDIC representation of the data. Not all
characters can be displayed. Characters that cannot be displayed are represented by a period ( . ).
The diagnostic spooled file contains this information:
• The sequence number of the PDF map entry used is 2
• The mapping program is QPQMAPEXIT in library QSYS.

88 IBM i: Advanced Function Presentation (AFP)


• The map object is TEST in library JKLAR.
• The release on which this trace was taken is V7R2M0.
• The reason code is listed as AA, FF or GG, which indicates that this information was user-requested.
– AA indicates that the spooled file was written by the WTR job when processing a request to respool
AFPDS.
– FF indicates that the spooled file was written by the PDJ job.
– GG indicates that the spooled file was written by the WTR job when processing a spooled file with
segments to be split.
• The data in the various mapping program formats is displayed. The formats displayed depend on what
the user requests. This example contains the following formats:
– Mapping Program Input Information format
– Mapping Program Output format
– Extension Area format
- Subject
- Reply-to e-mail address
- CC e-mail address
- BCC e-mail address
- Name of the PDF stream file written to the integrated file system
- Name of the PDF file attached to the e-mail
- Public authority for the PDF file
– Spooled File PDF Distribution format
– Spooled File AFPDS Distribution format
– PDF Encryption format
– Mail sender (found in the Extension Area format)
– Stream File format
– Individual Stream File Information format (a stream file to include in the body of the e-mail)
– Stream File format
– Individual Stream File Information format (a stream file to include as an attachment to the e-mail)

12:49:04.591 BEFORE CALL TO MAP PROGRAM


12:49:04.591 LENGTH OF INPUT INFORMATION 0722 , 000002D2 HEX
12:49:04.591 LENGTH OF OUTPUT INFORMATION BUFFER 5000 , 00001388 HEX
12:49:04.591 LENGTH OF OUTPUT INFORMATION AVAILABLE 0000 , 00000000 HEX
QPQMAPEX 12:49:04.592 SN: 00000002
12:49:06.548 AFTER CALL TO MAP PROGRAM
12:49:06.548 LENGTH OF INPUT INFORMATION 0722 , 000002D2 HEX
12:49:06.548 LENGTH OF OUTPUT INFORMATION BUFFER 5000 , 00001388 HEX
12:49:06.548 LENGTH OF OUTPUT INFORMATION AVAILABLE 0000 , 00000000 HEX
******** 12:49:06.548 ****************************************
MAP PGM 12:49:06.548 QSYS QPQMAPEXIT
MAP OBJ 12:49:06.548 JKLAR TEST
RELEASE 12:49:06.548 V7R2M0
RC 12:49:06.548 FF
INPUT 12:49:06.548
000000 D8D7C1C4 C5E5F0F0 F0C4D1D2 D3C1D940 40404040 F0F6F5F7 F6F3C5C5 E2F0F1F0 QPADEV000DJKLAR.....065763EES010
000020 40404040 0000000A 9196A285 4B828199 99818281 A27C9985 86A48789 964B85A2 ........jose.barrabas@refugio.es
000040 4B839694 40404040 40404040 40404040 40404040 40404040 40404040 40404040 .com............................
000060 40404040 40404040 40404040 40404040 40404040 40404040 40404040 40404040 ................................
000080 40404040 40404040 40404040 40404040 40404040 40404040 40404040 40404040 ................................
0000A0 40404040 40404040 40404040 40404040 40404040 40404040 40404040 40404040 ................................
0000C0 40404040 40404040 40404040 40404040 40404040 40404040 40404040 40404040 ................................
0000E0 40404040 40404040 40404040 40404040 40404040 40404040 40404040 40404040 ................................
000100 40404040 40404040 40404040 40404040 40404040 40404040 40404040 40404040 ................................
000120 40404040 40404040 40404040 40404040 40404040 40404040 40404040 40404040 ................................
000140 40404040 40404040 40404040 40404040 40404040 40404040 40404040 40404040 ................................
000160 40404040 40404040 40404040 40404040 40404040 40404040 40404040 40404040 ................................
000180 40404040 40404040 40404040 40404040 40404040 40404040 40404040 40404040 ................................
0001A0 40404040 40404040 40404040 40404040 40404040 40404040 40404040 40404040 ................................
0001C0 40404040 40404040 40404040 40404040 40404040 40404040 40404040 40404040 ................................
0001E0 40404040 40404040 40404040 40404040 40404040 40404040 40404040 40404040 ................................
000200 40404040 40404040 40404040 40404040 40404040 40404040 40404040 40404040 ................................
000220 40404040 40404040 40404040 40404040 40404040 40404040 40404040 40404040 ................................
000240 40404040 40404040 40404040 40404040 40404040 40404040 40404040 40404040 ................................
000260 40404040 40404040 40404040 40404040 40404040 4040F240 0000FFFF D1D2D3C1 ......................2.....JKLA
000280 D9404040 40404040 40404040 40404040 C2D3C4C1 E2F6F140 911CE3C7 5EE61001 R...............BLDAS61.j.TG;W..
0002A0 D1D2D7C4 C6404040 4040D8E4 E2D9E2E8 E2404040 E3C5E2E3 40404040 4040D1D2 JKPDF.....QUSRSYS...TEST......JK
0002C0 D3C1D940 40404040 5CE2E3C4 40404040 4040 LAR.....*STD......

Advanced Function Presentation (AFP) 89


OUTPUT 12:49:06.548
000000 F1F00000 000000FF 00000013 D7938581 A2854099 85A58985 A640A388 854081A3 10..........Please.review.the.at
000020 A3818388 85844099 85979699 A34B4040 40404040 40404040 40404040 40404040 tached.report...................
000040 40404040 40404040 40404040 40404040 40404040 40404040 40404040 40404040 ................................
000060 40404040 40404040 40404040 40404040 40404040 40404040 40404040 40404040 ................................
000080 40404040 40404040 40404040 40404040 40404040 40404040 40404040 40404040 ................................
0000A0 40404040 40404040 40404040 40404040 40404040 40404040 40404040 40404040 ................................
0000C0 40404040 40404040 40404040 40404040 40404040 40404040 40404040 40404040 ................................
0000E0 40404040 40404040 40404040 40404040 40404040 40404040 40404040 40404040 ................................
000100 40404040 40404040 404040F1 00000132 00000000 F1F1F0F0 00000000 000000 ...........1........1100.......
TO 12:49:06.549
000000 8281A289 937CA381 97978195 A985854B 839694 basil@tappanzee.com
EXT AREA 12:49:06.549
000000 00000070 000001A2 00000012 000001B4 00000015 000001E8 00000010 000001F8 .......s...............Y.......8
000020 00000012 00000000 00000000 00000000 00000000 00000251 00000013 000001C9 ...............................I
000040 0000001F 00000264 00000008 0000026C 00000131 00000000 00000000 0000020A ...............%................
000060 00000047 D9C4C5D5 C1D3C940 4040F0F0 ....RDENALI...00
SUBJECT 12:49:06.549
000000 C5A49996 40839389 9482A240 88898788 8599 Euro.climbs.higher
REPLYTO 12:49:06.549
000000 A2A38597 8881957C A3819797 8195A985 854B8396 94 stephan@tappanzee.com
CC 12:49:06.549
000000 A3859999 81958385 7C818283 4B839694 terrance@abc.com
BCC 12:49:06.549
000000 82999695 8396A27C 848595A5 85994B83 9694 broncos@denver.com
STMF 12:49:06.549
000000 61889694 85619192 93819961 8585A24B 978486 /home/jklar/ees.pdf
PDF MAIL 12:49:06.549
000000 C995A385 999581A3 89969593 C6899581 95838981 93D98597 9699A34B 978486 InternationlFinancialReport.pdf
PUB AUT 12:49:06.549
000000 5CC5E7C3 D3E4C4C5 *EXCLUDE
PDF OUTQ 12:49:06.549
000000 D1D2E2C5 C7404040 4040D1D2 D3C1D940 40404040 5CE2D7D3 C6404040 40405CE2 JKSEG.....JKLAR.....*SPLF.....*S
000020 D7D3C640 40404040 5CE2D7D3 C6404040 40404040 40404040 40404040 40404040 PLF.....*SPLF...................
000040 40404040 40404040 40404040 40404040 40404040 40404040 40404040 40404040 ................................
000060 40404040 40404040 40404040 40404040 40404040 40404040 40404040 40404040 ................................
000080 40404040 40404040 40404040 40404040 40404040 40404040 40404040 40404040 ................................
0000A0 40404040 40404040 40404040 40404040 40404040 40404040 40404040 40404040 ................................
0000C0 40404040 40404040 40404040 40404040 40404040 40404040 40404040 40404040 ................................
0000E0 40404040 40404040 40404040 40404040 40404040 40404040 40404040 40404040 ................................
000100 40404040 40404040 40404040 40404040 40404040 40404040 40404040 40404040 ................................
000120 40404040 4040405C E2D7D3C6 40404040 40 .......*SPLF.....
ENCRYPT 12:49:06.594
000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 ................................
000020 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 ................................
000040 F0F0F1F2 F0F0F0 0012000
SENDER 12:49:06.594
000000 D9C4C5D5 C1D3C940 4040 RDENALI...
******** 12:49:06.594 ****************************************

Related information for AFP


Product manuals, IBM Redbooks publications, Web sites, and other information center topic collections
contain information that relates to the Advanced Function Presentation topic collection. You can view or
print any of the PDF files.

Manuals

• AFP Utilities for iSeries: User's Guide, S544-5349 (8683 KB)

• Font Summary for AFP Font Collection, S544-5633 (3773 KB)

• Infoprint Designer for iSeries: Getting Started, G544-5773 (551 KB)

• InfoPrint Font Summary, G550-1140 (1516 KB)

• Infoprint Server for iSeries: Introduction and Planning Guide, G544-5774 (635 KB)

• Infoprint Server for iSeries: User's Guide, G544-5775 (3829 KB)

• iSeries Guide to Output, S544-5319 (8836 KB)

IBM Redbooks

• IBM AS/400 Printing V, SG24-2160 (500 KB)

• IBM eServer™ iSeries Printing VI: Delivering the Output of e-business, SG24-6250 (760 KB)

90 IBM i: Advanced Function Presentation (AFP)


• IBM eServer iSeries Printing VII: Infoprint Server Implementation, REDP-3752 (350 KB)

Web sites
• Ricoh: Software - IBM i (www.infoprintsolutionscompany.com/internet/ipww.nsf/vwWebPublished/
swtp_ibmi_en). This Web site describes all of the IBM i Advanced Function Presentation (AFP) products.
• AFP Consortium (AFPC) (www.afpcinc.org). The AFP Consortium is an open standards body
consisting of hardware and software vendors which define and develop the AFP architecture. The latest
information about the AFP data stream architecture, white papers, and presentations may be found
on the AFP Consortium web site. Refer to the AFPC website for the latest versions of the following
documents:
– AFP Programming Guide and Line Data Reference
– AFPC Font Typeface Registry
– Bar Code Object Content Architecture Reference
– Color Management Object Content Architecture Reference
– Font Object Content Architecture Reference
– Graphics Object Content Architecture for Advanced Function Presentation Reference
– Image Object Content Architecture Reference
– Intelligent Printer Data Stream Reference
– MO:DCA Reference
– Overview of the AFP Color Management Architecture
– Presentation Object Subsets for AFP
– Presentation Text Object Content Architecture Reference
– Using OpenType Fonts in an AFP System

Other information
• DDS for printer files
• IBM i Access for Web
• IBM i Access for Windows
• IBM i NetServer
• Work management
• Working with printer output
• Installing, upgrading, or deleting IBM i and related software
Related reference
PDF files for AFP
You can view and print a PDF file of this information.

Advanced Function Presentation (AFP) 91


92 IBM i: Advanced Function Presentation (AFP)
Code license and disclaimer information

IBM grants you a nonexclusive copyright license to use all programming code examples from which you
can generate similar function tailored to your own specific needs.
SUBJECT TO ANY STATUTORY WARRANTIES WHICH CANNOT BE EXCLUDED, IBM, ITS PROGRAM
DEVELOPERS AND SUPPLIERS MAKE NO WARRANTIES OR CONDITIONS EITHER EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OR CONDITIONS OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT, REGARDING THE PROGRAM OR
TECHNICAL SUPPORT, IF ANY.
UNDER NO CIRCUMSTANCES IS IBM, ITS PROGRAM DEVELOPERS OR SUPPLIERS LIABLE FOR ANY OF
THE FOLLOWING, EVEN IF INFORMED OF THEIR POSSIBILITY:
1. LOSS OF, OR DAMAGE TO, DATA;
2. DIRECT, SPECIAL, INCIDENTAL, OR INDIRECT DAMAGES, OR FOR ANY ECONOMIC CONSEQUENTIAL
DAMAGES; OR
3. LOST PROFITS, BUSINESS, REVENUE, GOODWILL, OR ANTICIPATED SAVINGS.
SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR LIMITATION OF DIRECT, INCIDENTAL, OR
CONSEQUENTIAL DAMAGES, SO SOME OR ALL OF THE ABOVE LIMITATIONS OR EXCLUSIONS MAY NOT
APPLY TO YOU.

© Copyright IBM Corp. 2006, 2013 93


94 IBM i: Advanced Function Presentation (AFP)
Notices
This information was developed for products and services offered in the U.S.A.
IBM may not offer the products, services, or features discussed in this document in other countries.
Consult your local IBM representative for information on the products and services currently available in
your area. Any reference to an IBM product, program, or service is not intended to state or imply that
only that IBM product, program, or service may be used. Any functionally equivalent product, program, or
service that does not infringe any IBM intellectual property right may be used instead. However, it is the
user's responsibility to evaluate and verify the operation of any non-IBM product, program, or service.
IBM may have patents or pending patent applications covering subject matter described in this
document. The furnishing of this document does not grant you any license to these patents. You can
send license inquiries, in writing, to:

IBM Director of Licensing


IBM Corporation
North Castle Drive
Armonk, NY 10504-1785
U.S.A.

For license inquiries regarding double-byte (DBCS) information, contact the IBM Intellectual Property
Department in your country or send inquiries, in writing, to:

Intellectual Property Licensing


Legal and Intellectual Property Law
IBM Japan Ltd.
1623-14, Shimotsuruma, Yamato-shi
Kanagawa 242-8502 Japan

The following paragraph does not apply to the United Kingdom or any other country where such
provisions are inconsistent with local law: INTERNATIONAL BUSINESS MACHINES CORPORATION
PROVIDES THIS PUBLICATION "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR
IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF NON-INFRINGEMENT,
MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Some states do not allow disclaimer of
express or implied warranties in certain transactions, therefore, this statement may not apply to you.
This information could include technical inaccuracies or typographical errors. Changes are periodically
made to the information herein; these changes will be incorporated in new editions of the publication.
IBM may make improvements and/or changes in the product(s) and/or the program(s) described in this
publication at any time without notice.
Any references in this information to non-IBM Web sites are provided for convenience only and do not in
any manner serve as an endorsement of those Web sites. The materials at those Web sites are not part of
the materials for this IBM product and use of those Web sites is at your own risk.
IBM may use or distribute any of the information you supply in any way it believes appropriate without
incurring any obligation to you.
Licensees of this program who wish to have information about it for the purpose of enabling: (i) the
exchange of information between independently created programs and other programs (including this
one) and (ii) the mutual use of the information which has been exchanged, should contact:

IBM Corporation
Software Interoperability Coordinator, Department YBWA
3605 Highway 52 N
Rochester, MN 55901
U.S.A.

© Copyright IBM Corp. 2006, 2013 95


Such information may be available, subject to appropriate terms and conditions, including in some cases,
payment of a fee.
The licensed program described in this document and all licensed material available for it are provided by
IBM under terms of the IBM Customer Agreement, IBM International Program License Agreement or any
equivalent agreement between us.
Any performance data contained herein was determined in a controlled environment. Therefore, the
results obtained in other operating environments may vary significantly. Some measurements may have
been made on development-level systems and there is no guarantee that these measurements will be
the same on generally available systems. Furthermore, some measurements may have been estimated
through extrapolation. Actual results may vary. Users of this document should verify the applicable data
for their specific environment.
Information concerning non-IBM products was obtained from the suppliers of those products, their
published announcements or other publicly available sources. IBM has not tested those products and
cannot confirm the accuracy of performance, compatibility or any other claims related to non-IBM
products. Questions on the capabilities of non-IBM products should be addressed to the suppliers of
those products.
All statements regarding IBM's future direction or intent are subject to change or withdrawal without
notice, and represent goals and objectives only.
This information is for planning purposes only. The information herein is subject to change before the
products described become available.
This information contains examples of data and reports used in daily business operations. To illustrate
them as completely as possible, the examples include the names of individuals, companies, brands, and
products. All of these names are fictitious and any similarity to the names and addresses used by an
actual business enterprise is entirely coincidental.
COPYRIGHT LICENSE:
This information contains sample application programs in source language, which illustrate programming
techniques on various operating platforms. You may copy, modify, and distribute these sample programs
in any form without payment to IBM, for the purposes of developing, using, marketing or distributing
application programs conforming to the application programming interface for the operating platform
for which the sample programs are written. These examples have not been thoroughly tested under
all conditions. IBM, therefore, cannot guarantee or imply reliability, serviceability, or function of these
programs. The sample programs are provided "AS IS", without warranty of any kind. IBM shall not be
liable for any damages arising out of your use of the sample programs.
Each copy or any portion of these sample programs or any derivative work, must include a copyright
notice as follows:
© (your company name) (year). Portions of this code are derived from IBM Corp. Sample Programs.

© Copyright IBM Corp. _enter the year or years_.

If you are viewing this information softcopy, the photographs and color illustrations may not appear.

Programming interface information


This Advanced Function Presentation publication documents intended Programming Interfaces that allow
the customer to write programs to obtain the services of IBM i.

Trademarks
IBM, the IBM logo, and ibm.com are trademarks or registered trademarks of International Business
Machines Corp., registered in many jurisdictions worldwide. Other product and service names might be
trademarks of IBM or other companies. A current list of IBM trademarks is available on the Web at
"Copyright and trademark information" at www.ibm.com/legal/copytrade.shtml.

96 Notices
These terms are trademarks or registered trademarks of Ricoh Co., Ltd., in the United States, other
countries, or both:
• Advanced Function Presentation
• Advanced Function Printing
• AFCCU
• AFP
• Bar Code Object Content Architecture
• BCOCA
• Intelligent Printer Data Stream
• InfoPrint
• Infoprint
• IPDS
• Mixed Object Document Content Architecture
• MO:DCA
• Print Services Facility
• Ricoh
Adobe, the Adobe logo, PostScript, and the PostScript logo are either registered trademarks or
trademarks of Adobe Systems Incorporated in the United States, and/or other countries.
Microsoft, Windows, Windows NT, and the Windows logo are trademarks of Microsoft Corporation in the
United States, other countries, or both.
Other product and service names might be trademarks of IBM or other companies.

Terms and conditions


Permissions for the use of these publications is granted subject to the following terms and conditions.
Personal Use: You may reproduce these publications for your personal, noncommercial use provided that
all proprietary notices are preserved. You may not distribute, display or make derivative works of these
publications, or any portion thereof, without the express consent of IBM.
Commercial Use: You may reproduce, distribute and display these publications solely within your
enterprise provided that all proprietary notices are preserved. You may not make derivative works of
these publications, or reproduce, distribute or display these publications or any portion thereof outside
your enterprise, without the express consent of IBM.
Except as expressly granted in this permission, no other permissions, licenses or rights are granted, either
express or implied, to the publications or any information, data, software or other intellectual property
contained therein.
IBM reserves the right to withdraw the permissions granted herein whenever, in its discretion, the use
of the publications is detrimental to its interest or, as determined by IBM, the above instructions are not
being properly followed.
You may not download, export or re-export this information except in full compliance with all applicable
laws and regulations, including all United States export laws and regulations.
IBM MAKES NO GUARANTEE ABOUT THE CONTENT OF THESE PUBLICATIONS. THE PUBLICATIONS
ARE PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED,
INCLUDING BUT NOT LIMITED TO IMPLIED WARRANTIES OF MERCHANTABILITY, NON-INFRINGEMENT,
AND FITNESS FOR A PARTICULAR PURPOSE.

Notices 97
98 IBM i: Advanced Function Presentation (AFP)
IBM®

Product Number: 5770-SS1

You might also like