1 | Qualified input user space name | Input | Char(20) |
2 | Length of input data | Input | Binary(4) |
3 | Qualified output user space name | Input | Char(20) |
4 | Size of output user space used | Output | Binary(4) |
5 | Output controls table | Input | Char(*) |
6 | Length of the output controls table | Input | Binary(4) |
7 | Error code | I/O | Char(*) |
The Transform AFP to ASCII (QWPZTAFP) API transforms an Advanced Function Printing data stream (AFPDS) into an ASCII data stream. The ASCII data stream can be formatted for IBM, Hewlett-Packard, or PostScript-capable printers.
The QWPZTAFP API processes the following AFPDS objects:
Note: IM1 image data is an object format used in the Advanced Function Printing data stream. It is device-dependent and uses pel-to-pel mapping for presentation.
The QWPZTAFP API does not process the following AFPDS objects:
AFP commands that are not supported by the QWPZTAFP API are ignored, and no warning or error message is sent to the user.
Fonts and character placement may appear different when printing a transformed data stream on an ASCII printer than if the same data stream (not transformed to ASCII) had been printed on an AFP-capable printer.
Note: This API is no longer being enhanced. The Host Print Transform (QWPZHPTR, QwpzHostPrintTransform) API should be used instead.
The name of the user space that contains the Advanced Function Printer data stream to be transformed. The first 10 characters contain the user space name, and the second 10 characters contain the name of the library where the user space is located. The special values allowed for the library name are *LIBL and *CURLIB. Both the user space name and the library name are left-justified.
The number of bytes of AFP data to be transformed in the input space.
The name of the user space to receive the ASCII data stream. The first 10 characters contain the user space name and the second 10 characters contain the name of the library where the user space is located. The special values allowed for the library name are *LIBL and *CURLIB. Both the user space name and the library name are left-justified.
The number of bytes written to the output space.
The format that contains information to control certain aspects of the output data generated by the transform option. See the Output Controls Table Format for more information.
The length of the output controls table in bytes.
The structure in which to return error information. For the format of the structure, see Error Code Parameter.
The following table shows the format for the fields passed to the QWPZTAFP API to control the generated output. See the Field Descriptions for more information on the field names in the following table.
Offset | Type | Field | |
---|---|---|---|
Dec | Hex | ||
0 | 0 | BINARY(4) | Data stream type |
4 | 4 | BINARY(4) | Top border size |
8 | 8 | BINARY(4) | Left border size |
12 | C | BINARY(4) | Start page number |
16 | 10 | BINARY(4) | End page number |
20 | 14 | CHAR(1) | Set character position |
21 | 15 | CHAR(1) | Download fonts |
Data stream type. A number that corresponds to the type of ASCII data stream to be generated. The following table shows the supported values and the data stream type definition.
Value | Data Stream Type Definition |
---|---|
1 | IBM LaserPrinter 4019 in page printer data stream mode |
2 | IBM LaserPrinter 4029 in page printer data stream mode |
3 | Hewlett-Packard LaserJet II or compatible (4019 in Hewlett-Packard mode) |
4 | Hewlett-Packard LaserJet III |
5 | IBM Personal Page Printer in Hewlett-Packard mode |
6 | Any printer in PostScript mode |
7 | Text-only data stream |
The default value is 7 for a data stream that is only text.
Download fonts. Allowed values are Y (yes) and N (no).
If Y is used, fonts specified in the AFP data stream are mapped by the transform operation to a scalable font, available on the ASCII printer, or to a font contained in the transform, that can be downloaded and used on the printer. This value is recommended if the AFP data stream uses typographic fonts.
If N is used, fonts specified in the AFP data stream are mapped to a resident font on the ASCII printer. No soft fonts are downloaded. This reduces the size of the output created by the transform operation.
The default value is Y.
Note: Fonts downloaded in Hewlett-Packard printer control language (PCL) format are in portrait-mode only.
End page number. The number of the last page in the input buffer to transform. The following pages are skipped. The special value -1 indicates to transform to the end of the buffer.
The default value is -1.
Left border size. The size in 1/300ths of an inch of the left border. The AFP to ASCII Transform API moves the output towards the right of the page by the specified amount. This can be used to force output outside of the unprintable border of an ASCII printer. This may cause output to be pushed off of the right side of the page.
Any value 0 or greater is valid. The default value is 0.
Set character position. Allowed values are Y (yes) and N (no).
If Y is used, the transform sets the position of each character on the page. This is done to compensate for any difference in character widths between the font specified in the AFP data stream and the font that is used by the transform operation. Using this option improves the appearance of the output in some instances.
If N is used, the transform only sets the position of a character after an absolute move command in the AFP data stream. This reduces the size of the output created by the transform.
The default value is Y.
Start page number. The number of the first page in the input buffer to transform. Previous pages are skipped.
The default value is 1.
Top border size. The size, in 1/300ths of an inch, of the top border. The AFP to ASCII Transform API moves the output down the page by the specified amount. You can use this API to force output outside of the unprintable border of an ASCII printer; however, this may cause some information to print off the page.
Any value 0 or greater is valid. The default value is 0.
Message ID | Error Message Text |
---|---|
CPF24B4 E | Severe error while addressing parameter list. |
CPF3C90 E | Literal value cannot be changed. |
CPF3CF1 E | Error code parameter not valid. |
CPF3CF2 E | Error(s) occurred during running of &1 API. |
CPF6DF0 E | ASCII data stream too large for user space &1. |
CPF6DF1 E | Field number &1 in output controls table not valid. |
CPF6DF2 E | AFP data stream in user space &1 not valid. |
CPF7B10 E | Length parameter &1 is not valid. |
CPF9801 E | Object &2 in library &3 not found. |
CPF9802 E | Not authorized to object &2 in &3. |
CPF9803 E | Cannot allocate object &2 in library &3. |
CPF9810 E | Library &1 not found. |
CPF9820 E | Not authorized to use library &1. |
CPF9856 E | Service Program &2 for program &3 not found or not available. |
CPF9872 E | Program or service program &1 in library &2 ended. Reason code &3. |
Top | Print APIs | APIs by category |