529 lines
14 KiB
HTML
529 lines
14 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<html>
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
|
<meta name="Copyright" content="Copyright (c) 2006 by IBM Corporation">
|
|
<title>Transform AFP to ASCII (QWPZTAFP) API</title>
|
|
<!-- Begin Header Records ========================================== -->
|
|
<!-- All rights reserved. Licensed Materials Property of IBM -->
|
|
<!-- US Government Users Restricted Rights -->
|
|
<!-- Use, duplication or disclosure restricted by -->
|
|
<!-- GSA ADP Schedule Contract with IBM Corp. -->
|
|
<!-- Print SCRIPT A converted by B2H R4.1 (346) (CMS) by V2KEA304 -->
|
|
<!-- at RCHVMW2 on 17 Feb 1999 at 11:05:09 -->
|
|
<!--File Edited by Kersten Oct 2001 -->
|
|
<!--End Header Records -->
|
|
<link rel="stylesheet" type="text/css" href="../rzahg/ic.css">
|
|
</head>
|
|
<body>
|
|
<a name="Top_Of_Page"></a>
|
|
<!-- Java sync-link -->
|
|
<script language="Javascript" src="../rzahg/synch.js" type="text/javascript">
|
|
</script>
|
|
|
|
<h2>Transform AFP to ASCII (QWPZTAFP) API</h2>
|
|
|
|
<div class="box" style="width: 70%;">
|
|
<br>
|
|
Required Parameter Group:<br>
|
|
<!-- iddvc RMBR -->
|
|
<br>
|
|
<table width="100%">
|
|
|
|
<tr>
|
|
<td align="center" valign="top" width="10%">1</td>
|
|
<td align="left" valign="top" width="50%">Qualified input user space name</td>
|
|
<td align="left" valign="top" width="20%">Input</td>
|
|
<td align="left" valign="top" width="20%">Char(20)</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="center" valign="top">2</td>
|
|
<td align="left" valign="top">Length of input data</td>
|
|
<td align="left" valign="top">Input</td>
|
|
<td align="left" valign="top">Binary(4)</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="center" valign="top">3</td>
|
|
<td align="left" valign="top">Qualified output user space name</td>
|
|
<td align="left" valign="top">Input</td>
|
|
<td align="left" valign="top">Char(20)</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="center" valign="top">4</td>
|
|
<td align="left" valign="top">Size of output user space used</td>
|
|
<td align="left" valign="top">Output</td>
|
|
<td align="left" valign="top">Binary(4)</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="center" valign="top">5</td>
|
|
<td align="left" valign="top">Output controls table</td>
|
|
<td align="left" valign="top">Input</td>
|
|
<td align="left" valign="top">Char(*)</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="center" valign="top">6</td>
|
|
<td align="left" valign="top">Length of the output controls table</td>
|
|
<td align="left" valign="top">Input</td>
|
|
<td align="left" valign="top">Binary(4)</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="center" valign="top">7</td>
|
|
<td align="left" valign="top">Error code</td>
|
|
<td align="left" valign="top">I/O</td>
|
|
<td align="left" valign="top">Char(*)</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<br>
|
|
Default Public Authority: *USE<br>
|
|
<!-- iddvc RMBR -->
|
|
<br>
|
|
Threadsafe: No<br>
|
|
<!-- iddvc RMBR -->
|
|
<br>
|
|
</div>
|
|
|
|
<p>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.</p>
|
|
|
|
<p>The QWPZTAFP API processes the following AFPDS objects:</p>
|
|
|
|
<ul>
|
|
<li>Document</li>
|
|
|
|
<li>Presentation page</li>
|
|
|
|
<li>Presentation text data</li>
|
|
|
|
<li>IM1 image data</li>
|
|
|
|
<li>IO image (IOCA) commands</li>
|
|
|
|
<li>Presentation Text 2 (PT2) text commands</li>
|
|
|
|
<li>Overlay resources</li>
|
|
|
|
<li>Page segment resources</li>
|
|
</ul>
|
|
|
|
<p><strong>Note:</strong> 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.</p>
|
|
|
|
<p>The QWPZTAFP API does not process the following AFPDS objects:</p>
|
|
|
|
<ul>
|
|
<li>Graphic data (GOCA) commands</li>
|
|
|
|
<li>Bar code (BCOCA) commands</li>
|
|
|
|
<li>Double-byte character set (DBCS) fonts</li>
|
|
</ul>
|
|
|
|
<br>
|
|
|
|
|
|
<p>AFP commands that are not supported by the QWPZTAFP API are ignored, and no
|
|
warning or error message is sent to the user.</p>
|
|
|
|
<p>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.</p>
|
|
|
|
<p><strong>Note:</strong> This API is no longer being enhanced. The <a href=
|
|
"QWPZHPTR.htm">Host Print Transform (QWPZHPTR, QwpzHostPrintTransform) API</a>
|
|
should be used instead.</p>
|
|
|
|
<br>
|
|
|
|
|
|
<h3>Authorities and Locks</h3>
|
|
|
|
<dl>
|
|
<dt><em>Library Authority</em></dt>
|
|
|
|
<dd>*USE</dd>
|
|
|
|
<dt><em>User Space Authority</em></dt>
|
|
|
|
<dd>*CHANGE, *OBJMGT</dd>
|
|
|
|
<dt><em>User Space Lock</em></dt>
|
|
|
|
<dd>*EXCL</dd>
|
|
</dl>
|
|
|
|
<br>
|
|
|
|
|
|
<h3>Required Parameter Group</h3>
|
|
|
|
<dl>
|
|
<dt><strong>Qualified input user space name</strong></dt>
|
|
|
|
<dd>INPUT; CHAR(20)
|
|
|
|
<p>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.</p>
|
|
</dd>
|
|
|
|
<dt><strong>Length of input data</strong></dt>
|
|
|
|
<dd>INPUT; BINARY(4)
|
|
|
|
<p>The number of bytes of AFP data to be transformed in the input space.</p>
|
|
</dd>
|
|
|
|
<dt><strong>Qualified output user space name</strong></dt>
|
|
|
|
<dd>INPUT; CHAR(20)
|
|
|
|
<p>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.</p>
|
|
</dd>
|
|
|
|
<dt><strong>Size of output user space used</strong></dt>
|
|
|
|
<dd>OUTPUT; BINARY(4);
|
|
|
|
<p>The number of bytes written to the output space.</p>
|
|
</dd>
|
|
|
|
<dt><strong>Output controls table</strong></dt>
|
|
|
|
<dd>INPUT; CHAR(*)
|
|
|
|
<p>The format that contains information to control certain aspects of the
|
|
output data generated by the transform option. See the <a href="#HDRTRANSFT">
|
|
Output Controls Table Format</a> for more information.</p>
|
|
</dd>
|
|
|
|
<dt><strong>Length of the output controls table</strong></dt>
|
|
|
|
<dd>INPUT; BINARY(4)
|
|
|
|
<p>The length of the output controls table in bytes.</p>
|
|
</dd>
|
|
|
|
<dt><strong>Error code</strong></dt>
|
|
|
|
<dd>I/O; CHAR(*)
|
|
|
|
<p>The structure in which to return error information. For the format of the
|
|
structure, see <a href="../apiref/error.htm#hdrerrcod">Error Code Parameter</a>.</p>
|
|
</dd>
|
|
</dl>
|
|
|
|
<br>
|
|
|
|
|
|
<h3><a name="HDRTRANSFT">Output Controls Table Format</a></h3>
|
|
|
|
<p>The following table shows the format for the fields passed to the QWPZTAFP
|
|
API to control the generated output. See the <a href="#HDRTRANSFD">Field
|
|
Descriptions</a> for more information on the field names in the following
|
|
table.</p>
|
|
|
|
<table border width="80%">
|
|
<tr>
|
|
<th align="center" valign="bottom" colspan="2">Offset</th>
|
|
<th align="left" valign="bottom" rowspan="2">Type</th>
|
|
<th align="left" valign="bottom" rowspan="2">Field</th>
|
|
</tr>
|
|
|
|
<tr>
|
|
<th align="center" valign="bottom">Dec</th>
|
|
<th align="center" valign="bottom">Hex</th>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="center" valign="top" width="10%">0</td>
|
|
<td align="center" valign="top" width="10%">0</td>
|
|
<td align="left" valign="top" width="20%">BINARY(4)</td>
|
|
<td align="left" valign="top" width="60%">Data stream type</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="center" valign="top">4</td>
|
|
<td align="center" valign="top">4</td>
|
|
<td align="left" valign="top">BINARY(4)</td>
|
|
<td align="left" valign="top">Top border size</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="center" valign="top">8</td>
|
|
<td align="center" valign="top">8</td>
|
|
<td align="left" valign="top">BINARY(4)</td>
|
|
<td align="left" valign="top">Left border size</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="center" valign="top">12</td>
|
|
<td align="center" valign="top">C</td>
|
|
<td align="left" valign="top">BINARY(4)</td>
|
|
<td align="left" valign="top">Start page number</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="center" valign="top">16</td>
|
|
<td align="center" valign="top">10</td>
|
|
<td align="left" valign="top">BINARY(4)</td>
|
|
<td align="left" valign="top">End page number</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="center" valign="top">20</td>
|
|
<td align="center" valign="top">14</td>
|
|
<td align="left" valign="top">CHAR(1)</td>
|
|
<td align="left" valign="top">Set character position</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="center" valign="top">21</td>
|
|
<td align="center" valign="top">15</td>
|
|
<td align="left" valign="top">CHAR(1)</td>
|
|
<td align="left" valign="top">Download fonts</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<br>
|
|
<br>
|
|
|
|
|
|
<h3><a name="HDRTRANSFD">Field Descriptions</a></h3>
|
|
|
|
<p><strong>Data stream type.</strong> 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.</p>
|
|
|
|
<p><strong><a name="TBLFORMAT">Data Stream Type</a></strong></p>
|
|
|
|
<table border cellpadding="5">
|
|
<!-- cols="10 90" -->
|
|
<tr>
|
|
<th align="center" valign="top">Value</th>
|
|
<th align="left" valign="top">Data Stream Type Definition</th>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="center" valign="top">1</td>
|
|
<td align="left" valign="top">IBM LaserPrinter 4019 in page printer data stream
|
|
mode</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="center" valign="top">2</td>
|
|
<td align="left" valign="top">IBM LaserPrinter 4029 in page printer data stream
|
|
mode</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="center" valign="top">3</td>
|
|
<td align="left" valign="top">Hewlett-Packard LaserJet II or compatible (4019
|
|
in Hewlett-Packard mode)</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="center" valign="top">4</td>
|
|
<td align="left" valign="top">Hewlett-Packard LaserJet III</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="center" valign="top">5</td>
|
|
<td align="left" valign="top">IBM Personal Page Printer in Hewlett-Packard
|
|
mode</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="center" valign="top">6</td>
|
|
<td align="left" valign="top">Any printer in PostScript mode</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="center" valign="top">7</td>
|
|
<td align="left" valign="top">Text-only data stream</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<br>
|
|
|
|
|
|
<p>The default value is 7 for a data stream that is only text.</p>
|
|
|
|
<p><strong>Download fonts.</strong> Allowed values are Y (yes) and N (no).</p>
|
|
|
|
<p>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.</p>
|
|
|
|
<p>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.</p>
|
|
|
|
<p>The default value is Y.</p>
|
|
|
|
<p><strong>Note:</strong> Fonts downloaded in Hewlett-Packard printer control
|
|
language (PCL) format are in portrait-mode only.</p>
|
|
|
|
<p><strong>End page number.</strong> 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.</p>
|
|
|
|
<p>The default value is -1.</p>
|
|
|
|
<p><strong>Left border size.</strong> 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.</p>
|
|
|
|
<p>Any value 0 or greater is valid. The default value is 0.</p>
|
|
|
|
<p><strong>Set character position.</strong> Allowed values are Y (yes) and N
|
|
(no).</p>
|
|
|
|
<p>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.</p>
|
|
|
|
<p>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.</p>
|
|
|
|
<p>The default value is Y.</p>
|
|
|
|
<p><strong>Start page number.</strong> The number of the first page in the
|
|
input buffer to transform. Previous pages are skipped.</p>
|
|
|
|
<p>The default value is 1.</p>
|
|
|
|
<p><strong>Top border size.</strong> 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.</p>
|
|
|
|
<p>Any value 0 or greater is valid. The default value is 0.</p>
|
|
|
|
<br>
|
|
|
|
|
|
<h3>Error Messages</h3>
|
|
|
|
<table cellpadding="5">
|
|
<!-- cols="15 85" -->
|
|
<tr>
|
|
<th align="left" valign="top">Message ID</th>
|
|
<th align="left" valign="top">Error Message Text</th>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td width="15%" valign="top">CPF24B4 E</td>
|
|
<td width="85%" valign="top">Severe error while addressing parameter list.</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td valign="top">CPF3C90 E</td>
|
|
<td valign="top">Literal value cannot be changed.</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td valign="top">CPF3CF1 E</td>
|
|
<td valign="top">Error code parameter not valid.</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td valign="top">CPF3CF2 E</td>
|
|
<td valign="top">Error(s) occurred during running of &1 API.</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td valign="top">CPF6DF0 E</td>
|
|
<td valign="top">ASCII data stream too large for user space &1.</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td valign="top">CPF6DF1 E</td>
|
|
<td valign="top">Field number &1 in output controls table not valid.</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td valign="top">CPF6DF2 E</td>
|
|
<td valign="top">AFP data stream in user space &1 not valid.</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td valign="top">CPF7B10 E</td>
|
|
<td valign="top">Length parameter &1 is not valid.</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td valign="top">CPF9801 E</td>
|
|
<td valign="top">Object &2 in library &3 not found.</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td valign="top">CPF9802 E</td>
|
|
<td valign="top">Not authorized to object &2 in &3.</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td valign="top">CPF9803 E</td>
|
|
<td valign="top">Cannot allocate object &2 in library &3.</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td valign="top">CPF9810 E</td>
|
|
<td valign="top">Library &1 not found.</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td valign="top">CPF9820 E</td>
|
|
<td valign="top">Not authorized to use library &1.</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td valign="top">CPF9856 E</td>
|
|
<td valign="top">Service Program &2 for program &3 not found or not
|
|
available.</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td valign="top">CPF9872 E</td>
|
|
<td valign="top">Program or service program &1 in library &2 ended.
|
|
Reason code &3.</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<hr>
|
|
API Introduced: V2R3
|
|
|
|
<hr>
|
|
<table cellpadding="2" cellspacing="2" align="center">
|
|
<tr align="center">
|
|
<td valign="middle" align="center"><a href="#Top_Of_Page">Top</a> | <a href=
|
|
"print1.htm">Print APIs</a> | <a href="aplist.htm">APIs by
|
|
category</a></td>
|
|
</tr>
|
|
</table>
|
|
</body>
|
|
</html>
|
|
|