General Print APIs
General print APIs can obtain information about or perform printing activities on
the system. They can:
- Retrieve output queue information such as status and number of entries on
the queue.
- Retrieve information about specific printer writers.
- Transform data streams from one type to another.
The general print APIs are:
- Add PDF Map Entry (QPQAPME) allows you to add an entry to a PDF map object.
- Build Open Time Commands (QSPBOPNC) uses the attributes of the spooled file to build commands that must be sent ahead of the data to prepare the printer to print the spooled file. These commands are referred to as open time commands. The open time commands contain most of the file level commands needed to format the printed output.
- Build Separator Pages (QSPBSEPP) builds the system separator page to be printed for the spooled file. A user exit program is called to build the separator page or the system default is used. The separator page is returned in the receiver variable parameter. This data can then be sent to the printer.
- Change Output Queue (QSPCHGOQ) changes the attributes of the output queue specified.
- Convert Image (QIMGCVTI, QimgCvtImg) converts an image or print data stream from one format to another, and optionally prints the result.
- Copy AFPDS Resources (QGSCPYRS) puts an AFPDS data stream equivalent of the specified AFPDS resource into the specified user space.
- Create PDF Map (QPQCRTPM) allows you to create a PDF map.
- Delete PDF Map Object (QPQDLTPM) allows you to delete a PDF map object.
- Extract Writer Status (QSPEXTWI) is used by a driver program to access information about the writer, the spooled file the writer is processing, and to determine if the information for the spooled file has been changed. A call to this API should be made by a driver program after each buffer is sent to the printer.
- Host Print Transform (QWPZHPTR, QwpzHostPrintTransform) provides an interface to the Host Print Transform function. The Host Print Transform function transforms SCS or AFP data to ASCII data.
- Open List of AFP Information (QGYOLAFP) lists entries from a font mapping table or list font character set or code page information from a coded font and places the list in a receiver variable.
- Open List of PDF Map Information (QPQOLPM) allows you to obtain a list of entries within a PDF map object.
- Open List of Printers (QGYRPRTL) generates a list of printers on the system. Information about each printer is included with the list.
- Publish Print Information (QSPPUBPI) collects print object information and queues it for publishing in an LDAP directory.
- Remove PDF Map Object Entries (QPQRPME) allows you to remove PDF map entries.
- Retrieve AFP Information (QPQRAFPI) returns specific information about a PSF configuration object, a font table, or a coded font.
- Retrieve Output Queue Information (QSPROUTQ) retrieves information associated with the specified output queue. Information returned includes the parameters used to create the queue, the current status of the queue, and the number of entries on the queue.
- Retrieve Printer Attributes (QGYRPRTA) retrieves attributes about a specific printer device.
- Retrieve Writer Information (QSPRWTRI) retrieves printer writer information associated with the specified printer only when a printer writer is started to the printer. The information retrieved is similar to what can be seen when running the Work with Writer (WRKWTR) command for a particular printer writer.
- Send Writer Message (QSPSNDWM) is used by a driver exit program to send either an informational or inquiry message to the writer's message queue.
- Set Writer Status (QSPSETWI) is used by a driver exit program to update information about a spooled file that a writer is processing. This information is used on certain spooled file displays.
- Transform AFP to ASCII (QWPZTAFP) transforms an Advanced Function Printing data stream (AFPDS) into an ASCII data stream. This ASCII data stream can be formatted for IBM, Hewlett-Packard, or PostScript-capable printers.
The general print exit programs are:
- Customized Separator Page allows a user to customize the separator page preceding a spooled file. For example, an exit program can be used to create a banner-style separator page.
- Image Print Transform can be used to transform user ASCII data streams.
- IPDS to PDF Transform Interface submits an IPDS to PDF transform when a PDF transform is requested to the QIBM_QPQ_Transform exit point and the PDFGEN parameter on the PSF configuration object has a value other than *NONE.
- Print Driver defines how a user-defined print driver exit program must be written in order to be used with the iSeries printer writer program.
- PSF\/400 E-mail allows a customer to specify a mail tag instead of a mail address in the USRDFNDTA parameter of the printer file or the DDS STRPAGGRP parameter.
- Spool File Creation describes the layout of the message sent when using the QIBM_NOTIFY_CRTSPLF environment variable.
- Spool File Ready describes the layout of the message sent when the DTAQ parameter of CRTOUTQ or CHGOUTQ is used to specify a data queue.
- Writer Transform describes the interface between a user-defined transform exit program (transform exit) and an iSeries printer writer (writer). A transform exit program can be enabled by an operator when a writer is started to an output queue.