Printing enhancements
This chapter describes the following topics that are related to printing and output that were enhanced in IBM i 7.1:
10.1 Printing overview
IBM i has powerful printing and output functions. You can present information using overlays, bar codes, graphics, images, and more. IBM i supports various industrial-type printing and presentation solutions.
Choosing and implementing a printing and presentation solution requires you to be familiar with both your organization's requirements and resources, and the capabilities that are provided by IBM i.
IBM i has both Basic Printing and Advanced Function Presentation (AFP). 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. AFP is the original, integrated data stream on IBM i for generating fully composed pages of data.
The following list offers a high-level overview of the IBM i printing process:
1. The printing process starts when an application program runs. The application program creates output data. The output data is based on the application program and information that is contained in the printer file.
2. If print spooling is selected, the output data is placed in a spooled file and the spooled file is placed in an output queue. If direct printing is selected, the output data is sent directly to the printer.
3. The destination of the output data is based on values that are stored in several printing elements, such as job description, user profile, workstation description, printer file, and system values. Output queues are used to manage spooled files.
4. Spooled files in output queues can be used in the following ways:
 – Printed
 – Kept as records
 – Used as input to other applications
 – Transferred to other output queues
 – Sent as email
 – Used to create PDF files
5. The printer writer program interacts between the output queue and the printer and can be used to convert the printer data stream.
6. The printer writer program included in IBM i supports various printer data streams. IBM Print Services Facility™ for IBM i provides an additional function that provides support for the Advanced Function Presentation (AFP) Intelligent Printer Data Stream (IPDS).
Each printer must have a printer device description. The printer device description contains a configuration description of the printer. Printers can be attached by using various attachment methods.
7. You can use a remote writer to route spooled files from an output queue on your system to another system.
Figure 10-1 shows the IBM i printing process.
Figure 10-1 IBM i printing process
10.2 Overview of IBM i 6.1 print enhancements
Major enhancements to print were made in IBM i 6.1:
Date and time stamps in the spooling function were changed to Coordinated Universal Time. This change also required enhancements in data queue formats and addition of a third format that supports the Coordinated Universal Time time / date format.
System i Navigator and IBM Navigator for i were enhanced with the addition of an Add Printer wizard.
The ability to generate PDF documents directly from IBM i applications with only a minor change or override to your existing printer files was added. This function includes the following elements:
 – New IBM Transform Services for i5/OS 5761TS1 - option 1, which provides the AFP to PDF transform.
 – New printer file parameter enhancements to direct output to IFS stream files and to request that data be transformed.
For more information about the IBM i 6.1 print enhancements, see the IBM i 6.1 Technical Overview, SG24-7713.
10.3 Enhancements to base print functions
The sections that follow describe the following enhancements, which were made to the system base print functions:
10.3.1 CPYSPLF command enhancements for copying to PDF or TIFF stream files
The Copy Spoolfile (CPYSPLF) command was enhanced to greatly simplify copying of spooled files to the Integrated File System (IFS) as PDF or TIFF stream files.
The command interface changes are:
Added a special value *TOSTMF to the To database file (TOFILE) parameter, which specifies the command output is to go to a stream file.
Added the To stream file (TOSTMF) parameter, which is used to specify the stream file to which the output is directed.
Added the Workstation customizing object (WSCST) parameter, which specifies the Workstation customizing object, which specifies the conversion to be done.
Added the Stream file option (STMFOPT) parameter, which specifies whether the target stream file is to be replaced.
The detailed syntax for the new parameters follows:
To stream file (TOSTMF)
Specifies the stream file where the output data is written. All directories in the path name must exist. New directories are not created. This parameter must specify a value other than *NONE if the To database file (TOFILE) parameter is *TOSTMF.
 – *NONE
The output is written to a user-defined physical file. This value is only valid if the To database file (TOFILE) parameter specifies a user-defined physical database file.
 – path-name
Specify the path name for the stream file where the output data is to be written. This value is only valid if the To database file (TOFILE) parameter specifies *TOSTMF.
If the stream file exists, the CCSID associated with the stream file is not changed.
Workstation customizing object (WSCST)
Specifies the workstation customizing object to use to transform the spooled file output to its final form before it is written to a stream file. If the To database file (TOFILE) parameter specifies a physical database file, the WSCST parameter is ignored. To convert a spooled file by using the (WSCST) parameter, the device type (DEVTYPE) of the spooled file must be *SCS or *AFPDS.
 – *NONE
Specifies that no workstation customizing object is used.
If the To database file (TOFILE) parameter specifies *TOSTMF and the device type of the spooled file is *AFPDS or *USERASCII, the spooled file data is copied directly to the stream file. If the stream file does not exist, the associated CCSID of the stream file is set to 65535.
For other types of spooled files, the spooled file data is copied to the stream file using the Control character (CTLCHAR) parameter to format the data. Lines end with carriage return and line feed controls to indicate record boundaries. If the stream file does not exist, a CCSID obtained from the spooled file attributes is associated with the stream file.
If the spooled file has a CHRID attribute other than *DEVD, the CHRID attribute is used to select the CCSID to be associated with the stream file. If the spooled file has a CHRID attribute of *DEVD, the CCSID of the job that created the spooled file is used.
 – *PDF
The output is transformed to Portable Document Format (PDF) before it is written into a stream file. If the stream file does not exist, the CCSID associated with the stream file is set to 65535.
 – Qualifier 1: Workstation customizing object name
Specify the name of the customizing object. When a named customizing object is used and the stream file does not exist, the CCSID associated with the stream file is set
to 65535.
 – Qualifier 2: Library
 • *LIBL
All libraries in the library list for the current thread are searched until the first match is found.
 • *CURLIB
The current library for the job is used to locate the customizing object. If no current library entry exists in the library list, QGPL is used.
 • name
Specify the name of the library where the customizing object is located.
Stream file option (STMFOPT)
Specifies whether the copy operation replaces or fails to copy the records to the stream file if a stream file with the specified name exists. If the stream file does not exist, it is created.
 – *NONE
No records are copied and the operation fails.
 – *REPLACE
The records replace the existing stream file records.
Because this function is implemented by PTF, there is no online or prompter help for the new parameters and the new *TOSTMF value.
In Figure 10-2, the CPYSPLF command prompter is displayed and F11 was pressed to display the parameter names. The *TOSTMF value is specified for the TOFILE parameter, as shown in the red box. This setting directs the copy function to copy a spooled file to a stream file.
Figure 10-2 Copy spooled file command prompt - TOFILE parameter with *TOSTMF value
In Figure 10-3, the next panel of the CPYSPLF command is shown. In the red box, the specification of the new TOSTMF, WSCST, and STMFOPT parameters is shown.
The TOSTMF parameter directs to copy output to the /pdfoutput file.
The WSCST parameter specifies a conversion to a PDF file.
The STMFOPT parameter specifies the replacement of the current stream file.
Figure 10-3 Copy spooled file command prompt
PTFs and licensed programs: This function requires PTF SI43471 for IBM i 7.1 and the 5770TS1 IBM Transform Services for i and Transforms – AFP to PDF Transform licensed program.
10.3.2 New QIBM_QSP_SECURITY exit point and formats
Spooled file security is primarily controlled through the output queue that contains the spool file. In V6R1, there were four main ways in which a user can be authorized to control a spooled file:
The user is assigned spool control authority (SPCAUT(*SPLCTL)) in the user profile.
The user is assigned job control authority (SPCAUT(*JOBCTL)) in the user profile, the output queue is operator-controlled (OPRCTL(*YES)), and the user has *EXECUTE authority to the library that the output queue is in.
The user has the required object authority for the output queue.
The user is always allowed to control the spooled files that are created by that user.
Spooled file security is enhanced through the addition of a spooled file security exit point. This exit point can be used with a spooled file security exit program to allow more granular access to individual spooled files based on the operation to be run.
This new exit point changes the access criteria in the following ways:
The user is granted authority by the use of a spooled file security exit program. A user can be granted or denied access to any spooled file for one or several operations by the exit program.
The last two access methods that are mentioned in the previous list can be overridden by the spooled file security exit program.
This feature is another way to access spool files for the Copy Spooled File (CPYSPLF), Display Spooled File (DSPSPLF), and Send Network Spooled File (SNDNETSPLF) commands. If DSPDTA(*YES) is specified when the output queue is created, any user with *USE authority to the output queue is allowed to copy, display, send, or move spooled files.
If the user is authorized to control the file by one of the ways that are already listed, using DSPDTA(*NO) when you create the output queue does not restrict the user from displaying, copying, or sending the file. DSPDTA authority is checked only if the user is not otherwise authorized to the file. All of the previous access methods override DSPDTA(*NO).
Exit Point QIBM_QSP_SECURITY allows registered exit programs to control access to spooled files on a file-by-file basis. The exit programs are called at the beginning of each
IBM i spool command or API, except under any of the following conditions:
The job or thread has spool control (*SPLCTL) special authority. The special authority can originate from the user profile, group profile, or adopted authority.
The job or thread has job control (*JOBCTL) special authority and the spooled file is on an output queue with OPRCTL(*YES). The special authority can originate from the user profile, group profile, or adopted authority.
The command or API is run in a system job (including SCPF), a subsystem monitor job, or any job that is running under one of the system user profiles that are listed in Table 10-1.
Table 10-1 System user profiles
QAUTPROF
QCLUMGT
QCOLSRV
QDBSHR
QDBSHRDO
QDFTOWN
QDIRSRV
QDLFM
QDOC
QDSNX
QFNC
QGATE
QLPAUTO
QLPINSTALL
QMSF
QNETSPLF
QNFSANON
QNTP
QPEX
QPM400
QRJE
QSNADS
QSPL
QSPLJOB
QSRVAGT
QSYS
QTCP
QTFTP
QTSTRQS
 
The following commands use the exit point
CHGSPLFA: Change Spooled File Attributes
CPYSPLF: Copy Spooled File
DLTSPLF: Delete Spooled File
DSPSPLF: Display Spooled File
EXPORT: System i Navigator API to export an EBCDIC spooled file to an ASCII desktop
HLDSPLF: Hold Spooled File
QGSLRSC: List Spooled File AFPDS Resources API
QSPMOVSP: Move Spooled File API
QSPOPNSP: Open Spooled File API
QUSRSPLA: Retrieve Spooled File Attributes API
RLSSPLF: Release Spooled File
RST: Restore Object, Restore Library, or QSRRSTO API
SAV: Save Object, Save Library, or QSRSAVO API
SNDNETSPLF: Send Network Spooled File
SNDTCPSPLF: Send TCP/IP Spooled File
WRKPRTSTS: Work with Printing Status
WRKSPLFA: Work with Spooled File Attributes
More details about the exit program format names, formats, and parameters are available in the IBM i 7.1 Knowledge Center at:
An example of creating an exit program and using the QIBM_SP_SECURITY exit point is available in IBM Software Technical Document 560810071 - “QIBM_QSP_SECURITY Exit Point: Let's See How it Works” at:
10.3.3 Encryption of PDF output (Infoprint Server LP)
In IBM i 7.1, when you transform an Intelligent Printer Data Stream (IPDS) file to PDF, you can now encrypt the PDF stream or spooled file.
 
PDF encryption: PDF encryption is a feature of the Infoprint Server license program.
There is a new PDFENCRYPT parameter for the user-defined data USRDFNDTA parameter, which is used to specify whether to encrypt an output PDF stream file or spooled file and whether to send it as email. There are several ways to specify the USRDFNDTA parameter with the PDFENCRYPT parameter:
It can be specified for an existing spool file using the Change Spooled File Attributes (CHGSPLFA) command.
It can be specified in a printer file using the Create Printer File (CRTPRTF) command.
It can be specified by using the Override Printer File (OVRPRTF) command.
Values for the PDFENCRYPT parameter are as follows:
*NONE
Encryption and email 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 email is not sent. If this value is not specified, the email is sent. Use *NOMAIL to encrypt a stream file or spooled file without sending an email.
*STMF
The generated PDF file that is 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 that is 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.
Generating encrypted PDF output
To encrypt the output PDF file, complete the following steps:
1. Specify the email distribution option in a PDF map object entry or segment.
2. Specify encryption values for the email distribution option.
3. Specify the name of the PDF map object with the PDFMAP parameter in the Print Services Facility (PSF) configuration object.
4. Specify the default IBM-supplied user program with the PDFMAPPGM parameter in the PS configuration object.
5. Specify the PDFENCRYPT parameter on the printer file’s or spooled file’s
USRDFNDTA parameter.
The following list details examples of this procedure:
To convert a spooled file to an encrypted PDF, send it as email, and write it as an encrypted PDF file to the integrated file system, complete the following steps:
a. Specify the stream file distribution option in the PDF map object entry or segment.
b. Specify this parameter on the printer file or spooled file’s attributes:
USRDFNDTA('PDFENCRYPT(*STMF)')
To convert a spooled file to an encrypted PDF file and spool it as an encrypted PDF file without sending it as email, complete the following steps:
a. Specify the spooled file distribution option in the PDF map object entry or segment.
b. Specify this parameter on the printer file or spooled file’s attributes:
USRDFNDTA('PDFENCRYPT(*SPLF *NOMAIL)')
To convert a spooled file to an encrypted PDF file, spool it, and write it as an encrypted PDF file to the integrated file system without sending it as email, complete the following steps:
a. Specify the stream file distribution option in the PDF map object entry or segment.
b. Specify the spooled file distribution option in the PDF map object entry or segment.
c. 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 file, spool it, and write it as an encrypted PDF file to the integrated file system without sending it as email, complete the following steps:
a. Specify the stream file distribution option in the PDF map object entry or segment.
b. Specify the spooled file distribution option in the PDF map object entry or segment.
c. Specify this parameter on the printer file or spooled file’s attributes:
USRDFNDTA('PDFENCRYPT(*STMF *NOMAIL)')
10.4 Print Services Facility for IBM i enhancements
This section describes the Print Services Facility for IBM i (PSF) enhancements in IBM i 7.1. They include:
10.4.1 Disabling offset stacking and edge mark printing
PSF enables disabling offset stacking on cut-sheet printers and edge mark printing on continuous forms printers through a new PSF Defined Option (PSFDFNOPT) parameter named OFFSTACK:
PSFDFNOPT (OFFSTACK(*YES))
This command is the default. It specifies that there is no change to offset stacking and edge marking. Offset stacking and edge marking occurs between each spooled file. All offset stacking and edge mark changes in the form definition are honored.
PSFDFNOPT (OFFSTACK(*NO))
This command specifies that no offset stacking or edge marking is done, which includes offset stacking and edge marking done between spooled files and through the form definition.
This parameter is specified within a PSF configuration object that is either created through the Create PSF Configuration (CRTPSFCFG) command or specified by using the Change PSF Configuration (CHGPSFCFG) command.
10.4.2 Specifying public data authority for directories created by PSF
PSF is enhanced to enable specification of 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 enhancement applies to customer-written PDF mapping programs and to map objects. This function is enabled through a new PSF Defined Option (PSFDFNOPT) parameter named PDF Data Authority (PDFDTAAUT).
The various PDFDTAAUT values and their functions are as follows:
PSFDFNOPT (PDFDTAAUT(*INDIR))
The authority for the directory to be created is determined by the directory in which it is created. The directory immediately preceding the new directory determines the authority.
A directory that is 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 in which it is created.
A directory that is created in QDLS for a folder defaults to *EXCLUDE for a first-level folder. If created in the second level or higher, 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, PSF specifies the value *INDIR for the *PUBLIC object authority.
PSFDFNOPT (PDFDTAAUT(*RWX))
You can change the object and run basic functions on the object except those functions that are 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))
You 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))
You can run basic operations on the object, such as run a program or display the contents of a file. You cannot change the object. Read, execute (*RX) authority provides *OBJOPR and data *READ and execute (*EXECUTE) authorities.
PSFDFNOPT (PDFDTAAUT(*WX))
You 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))
You can view the contents of an object. Read (*R) authority provides *OBJOPR and data *READ authorities.
PSFDFNOPT (PDFDTAAUT(*W))
You can change the contents of an object. Write (*W) authority provides *OBJOPR and data *ADD, *UPD, and *DLT authorities.
PSFDFNOPT (PDFDTAAUT(*X))
You can run a program or search a library or directory. Execute (*X) authority provides *OBJOPR and data *EXECUTE authorities.
PSFDFNOPT (PDFDTAAUT(*EXCLUDE))
You 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 ends. Message PQT0038 is: Printer writer ended because of an error. Reason code 5 is: Value not recognized.
This parameter is specified within a PSF configuration object that is either created through the Create PSF Configuration (CRTPSFCFG) command or specified by using the Change PSF Configuration (CHGPSFCFG) command.
10.4.3 Improved PSF debugging capabilities
PSF added diagnostic trace files and new reason codes to aid in troubleshooting mapping problems. The new PSFTRACE diagnostic spool file contains in-depth information about your mapping program. It can be used with the reason codes issued with messages PQT4140 and PQT4151 (Incorrect data was returned by mapping program) to diagnose problems with your mapping program.
Although the PSFTRACE spool file is automatically generated if PQT4140 or PQT4151 is issued (except when the reason code is 15 for PQT4140), you might want to force creation of the PSFTRACE spool file. To do so, create a data area in library QGPL or QTEMP with the same name as the printer device, using the example command that is shown in Example 10-1.
Example 10-1 Command to create a data area to force a PSFTRACE spool file
CRTDTAARA DTAARA(library/printer_device_name)
TYPE(*CHAR)
LEN(40)
AUT(*ALL)
VALUE(X'E6E6D7C4E3D9C8D98000000000000800000000000000000032000000000000000000000000000000')
The data area must be created before you start the printer writer, must be created in the QGPL library, and the name must match the printer device description name. When the PSFTRACE file is no longer needed, delete the data area with the Delete Data Area (DLTDTAARA) command.
For more information about PSFTRACE and interpreting the data within it, see the “Troubleshooting Mapping Problems” section of the Advanced Function Presentation PDF at the IBM i 7.1 Knowledge Center, which can be found at:
The following error codes were added to the PQT4151 (Incorrect data was returned by mapping program) error message to support new function:
43: Value for PDF Email Comma Delimiter must be '0' or X'00' when SNDDST is the mail server.
44: Encryption of stream file or spooled file requested but encryption settings not specified.
45: Value for Encrypt PDF stream file must be '0' or '1'.
46: Value for Encrypt PDF spooled file must be '0' or '1'.
10.5 Transform Services enhancements
The following Transform Services functional enhancements are described in this section:
10.5.1 Generating PDFs from existing spooled files
Before IBM i 7.1, data was sent to directly to Transform Services. If the job that is generating the spool file ended abnormally without closing the spool file, no PDF output was generated.
In IBM i 7.1, the user can now generate PDF output from a spooled file. If the job ends after the spooled file is generated and closed, the user can generate the PDF from the spooled file, regardless of whether the spool file was closed before the job ended.
This capability is covered in more detail in 10.8, “Host Print Transform enhancements” on page 475.
10.5.2 PDF transform enhancements
The following sections describe enhancements to the PDF transform.
Additional bar code support
Bar code support of the PDF transform was enhanced to render all bar code types that are listed for the DDS bar code keyword, including intelligent USPS bar codes and two-dimensional codes.
A CPD6DF0 diagnostic message, bar code data did not print correctly due to errors, is logged if invalid data or parameters are specified.
AFP font support improvements
The PDF transform now converts Advanced Function Presentation fonts to PDF Type 1 or Type 3 fonts and embeds them to preserve text appearance and text content.
The transform continues to revert to the PDF standard font references if font resources are not available in font libraries and the library list. The text is limited to ANSI characters.
Improved globalization
Eastern European languages require embedded fonts to display all the characters.
Non-Latin1 character identifiers (CHRIDs) are now automatically mapped to the appropriate AFP font resources.
Where possible, font attributes such font size, bold fonts, italic fonts, and so on, are honored. Font mapping can be customized through a workstation customization (WSCST) object.
For these languages and character sets, the following products might be required:
5648-B45 AFP Font Collection for i V3.1
5648-E77 InfoPrint Fonts for Multi-platform
10.6 IBM Navigator for i print enhancements
IBM Navigator for i has the following enhancements that are related to printing:
The View as PDF task was added to enable viewing spooled files as PDFs, which include AFPDS and SCS printer output files. You can use this function to open and view the contents of a printer output file using Acrobat Reader.
The Export task was replaced with an “Export as” menu. The menu adds the ability to export spooled files as PDF files. You can use the new export of PDF files function to save the contents of a printer output file to your client desktop, to the integrated file system (IFS), to an output queue, or to an email.
Both the “View as PDF” and “Export as PDF to client” desktop tasks use Transform Services for the AFPDS and SCS conversions to PDF.
 
Requirement: The “Export as PDF” to IFS, to an output queue, and to an email require the 5722IP1 Infoprint Server for iSeries licensed program.
10.6.1 Viewing printer output in PDF format
To view printer output in PDF format, you must first go to the printer output.
Figure 10-4 shows the navigation to access the Printer Output function. In the IBM i Management list, the first arrow points to the Basic Operations link. When that link is selected, the Basic Operations menu opens.
Figure 10-4 Going to the printer output list in IBM Navigator for i
The second arrow in Figure 10-4 on page 467 points to the Printer Output menu item on the Basic Operations menu. When selected, a list of printer output is displayed, as shown in Figure 10-5.
Figure 10-5 Printer Output list with menu in IBM Navigator for i
Select a file and right-click, or click the Actions menu, and select View as PDF.
When the View PDF task is selected, you see the output as a PDF, as shown in Figure 10-6.
Figure 10-6 PDF displayed from View PDF in IBM Navigator for i
10.6.2 Exporting the printer output in PDF format
Print functions of IBM Navigator for i now use Transform Services and Infoprint Server to export spooled files in PDF format. The output can be processed as one of these options:
Export to the client’s file system
Export to an output queue
Export to the Integrated File System (IFS)
Export to email
 
Requirement: For the latter three options, the Infoprint Server licensed program (5722-IP1) is required. Users can use the native IBM Transform Services for i (5770-TS1) licensed program to export to the IFS, but they must map a network drive to the IFS and then select the first option.
The option to use the Infoprint Server licensed program to convert spooled files to
PDF remains.
The navigation to a specific printer output file is identical to what is shown in Figure 10-4 on page 467. Select a file and right click, or click the Actions menu. The menu opens, as shown in Figure 10-7.
Figure 10-7 Printer output list with Export PDF options shown
Select Export as. A menu with PDF options opens, as shown in Figure 10-7. Click PDF using Transform Services or PDF using Infoprint Server. In the next menu that opens, click the appropriate export option.
10.6.3 System i Navigator and exporting printer output in PDF format
To export printer output in PDF format using Transform Services, complete these steps:
1. In the navigation pane, click Basic Operations  Printer Output. Right-click a file and select Convert to PDF, as shown in Figure 10-8.
Figure 10-8 Convert to PDF using System i Navigator
2. The Convert Printer Output to PDF wizard window (Figure 11-9) opens.
Figure 10-9 Convert Printer Output to PDF wizard
The arrow points to Store in Stream File, which is consistent with saving the output in the IFS.
3. Click Next to have the wizard request a printer, as shown in Figure 10-10.
Because the system has no active printers capable of PDF conversion, the printer selection is disabled and Create new printer is automatically selected.
Figure 10-10 Convert Printer output to PDF - select printer
4. Click Next. You are prompted for a printer name and port, as shown in Figure 10-11. The Port defaults as shown.
Figure 10-11 Creating a PDF printer
5. Set the printer name to PDFPRINTER, and click Next.
6. Specify advanced configuration parameters in the printer configuration window, as shown in Figure 10-12. Click Next.
Figure 10-12 Specify advanced configuration parameters
The advanced parameters window (Figure 10-13) opens.
Figure 10-13 Advanced PDF printer configuration parameters
The arrow in Figure 10-13 points to an important function that minimizes the PDF size. Transform Services embed the PDF fonts in the PDF to preserve text appearance and text content. This action increases the size of the PDF file. This option directs transforms to not embed the PDF fonts.
7. Click Next. Another advanced parameters window (Figure 10-14) opens. Accept the defaults and click Next.
Figure 10-14 Advanced parameters
Enter the IFS path where the PDF is to be stored (Figure 10-15).
Figure 10-15 Setting the destination in the IFS
8. Create and secure the directories in the IFS, according to the following rules:
 – The directories must exist.
 – The QSPLJOB user (or *PUBLIC) must have *RWX (read / write / execute) authority to the root (/) directory.
 – The QSPLJOB user must have a minimum of *X (execute) authority to the directories in the path.
 – The QSPLJOB user must have *RWX (read / write / execute) authority to the directory where the files are stored.
9. Click Next to continue, and click Finish in the confirmation window to print.
10.7 IBM i Access for web print enhancements
IBM i Access now uses Transform Services to view spooled files in PDF format.
Support was added for the AFP to PDF Transform (option 1) of the IBM Transform Services for i (5770-TS1) licensed program when you view printer spool output as a PDF document.
Output can be viewed in a browser or placed in the IBM i integrated file system (IFS).
For more information, see the “IBM i Access for Web” topic in the IBM i 7.1 Knowledge Center, or the IBM i Access for web PDF at:
 
Change in requirements: System i Navigator and IBM i Access for Web previously required the 5722-IP1 IBM Infoprint Server for iSeries product to view output as PDF. This option is still usable for users that have the software, but it is no longer required.
10.8 Host Print Transform enhancements
Host Print Transform now uses Transform Services. The following sections explain the changes with examples.
10.8.1 The Host Print Transform API and Transform Services
The Host Print Transform (QwpzHostPrintTransform) API now uses Transform Services to convert existing *SCS and *AFPDS spooled files to PDF.
The function behavior is directed by a Workstation Customization Object (WSCST), which must specify the CTXFORM attribute. Three such WSCST objects with CTXFORM attribute are included with the system. One of these objects can be used, or you can create your own using the Create WSCST (CRTWSCST) command. The following three WSCST objects are included:
QSYS/QCTXPDF
This WSCST object includes tags to map all of the CJK World Type fonts included in IBM i option 43 to corresponding registered CMaps and character collections. This object allows ideographic characters to be rendered without embedding these large fonts within the document. The smaller World Type fonts are not mapped by this object and are embedded within the output document to allow non-Latin1 SBCS languages to be presented.
QSYS/QCTXPDFWT
This WSCST object contains tags to map all of the World Type fonts included with IBM i option 43 to corresponding Type 1 fonts or registered CMaps and character collections. This situation generally results in the smallest possible PDF file size, but only reliably presents Latin and CJK languages.
QSYS/QCTXPDFMBD
This WSCST is the minimal PDF object. It omits all font tags, so that the default font mapping is used for all font references. The default behavior is to embed all TrueType font references.
When the API is started with a WSCST object with the CTXFORM attribute, the job reads the input data stream from the spooled file that is specified in the API. Transform Services is called to generate the PDF output from the input spooled file data. Transform Services returns the PDF output in the output buffer that is provided on the API. For more information, see the API documentation in the IBM i 7.1 Knowledge Center at:
10.8.2 Example: Host Print Transform API with Transform Services
This sample flow illustrates the usage of the API to transform a spooled file to a PDF by using a workstation customization object of type CTXFORM:
1. The Host Print Transform API is called with the initialize (10) process option.
The Host Print Transform API sets any initial information and returns to the caller. The first eligible spooled file is selected for processing.
2. The Host Print Transform API is called with the process file (20) process option.
The name and identifier of the spooled file is passed in the input information. A workstation customization object of type *CTXFORM is passed in.
The Host Print Transform API checks to see that the iCTT transform service is available and determines whether it transforms the spooled file. It returns to the caller an indication whether it transforms the spooled file. It also passes back an indication that it reads the spooled file directly and the caller does not pass it any data. The end file (40) process option must be used before another process file (20) process option is allowed.
3. The Host Print Transform API is called with the transform data (30) process option.
The Host Print Transform API reads the spooled file data, transforms the data, and passes back the transformed data to the caller. If the buffer used by the caller cannot hold all of the transformed data, the Host Print Transform API indicates to the caller that it is not done transforming the file. The caller must call the API again with another transform data (30) process option. This step happens repeatedly until the entire transformed file is passed back to the caller, at which point the Host Print Transform API indicates that it is done transforming the file.
4. The Host Print Transform API is called with the end file (40) process option.
The Host Print Transform API returns to the caller any remaining data to be sent to the printer.
5. The caller selects the next eligible spooled file to be transformed.
Steps that start with the process file (20) process option are repeated.
6. All transformation is completed.
The Host Print Transform API is called with the terminate (50) process option. The Host Print Transform API cleans up any workspaces that it created and returns to the caller.
10.9 References
The following references have more information about IBM i printing:
IBM i Printing Basic Printing, found at:
IBM i Printing Advanced Function Presentation, found at:
IBM Advanced Function Printing Utilities for iSeries: User's Guide, found at:
IBM i Files and File Systems Spooled Files, found at:
System i Programming - DDS for Printer Files, found at:
iSeries Guide to Output, found at:
InfoPrint AFP Font Collection, found at:
InfoPrint AFP Print Utilities for System i, found at:
Print Services Facility for IBM i for i5/OS, found at:
 
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.15.226.79