IBM Support

How Host Print Transform (HPT) Handles the Unprintable Border When Printing *AFPDS Spooled Files

Troubleshooting


Problem

This document provides information on how Host Print Transform (HPT) handles the unprintable or no-print border when printing *AFPDS spooled files.

Resolving The Problem

This document discusses how the AFPDS-to-ASCII Transform code within Host Print Transform (HPT) handles the unprintable border (sometimes called the no-print border) when printing *AFPDS spooled files to an ASCII laser printer. This document will also compare this to how HPT handles the unprintable border when printing *SCS spooled files to an ASCII laser printer.

This document was last updated on 29 July 2014.





General Information About the Unprintable or No-Print Border

Laser printers (for example, HP LaserJet printers), Infoprint printers, and Lexmark Optra printers generally have an area around the outside of the page where it does not allow printing. This is referred to as the unprintable or no-print border.

IPDS-capable laser printers generally have an option to override this and will allow printing within the unprintable area after changing a setting in the printer hardware. In older Infoprint printers, the setting is called Edge-to-Edge and is usually found in the IPDS MENU within the hardware settings. In newer Infoprint printers (for example, the Infoprint 1140 printer) the setting is called Printable Area and is also usually found in the IPDS MENU within the hardware settings.

Note: Setting the Edge-to-Edge or Printable Area settings in the hardware settings for an IPDS-capable laser printer will allow printing within the unprintable border and will affect the positioning of an *AFPDS spooled file when printing through a *LCL, *RMT, or *LAN IPDS device description and using IBM Print Services Facility/400 (PSF/400) to print the spooled file. However, the Edge-to-Edge or Printable Area settings in the printer hardware settings affect only how *AFPDS spooled files are printed through an IPDS device description to an IPDS-capable laser printer, not when printing through a *LAN 3812 PJL or SNMP device description or a PC5250 printer session to an IPDS-capable laser printer.


How Host Print Transform (HPT) Handles the Unprintable Border When Printing *SCS Spooled Files

Host Print Transform (HPT) handles the unprintable border when printing *SCS spooled files by taking any fields that begin within the unprintable border on the left side or the top side and moving them to the right or down until those fields start outside the unprintable border. Any fields that then extend into the unprintable border on the right side or the bottom side will then get truncated. Therefore, the entire field may not be able to be printed successfully.

Because IBM OS/400 or IBM i5/OS usually generates *SCS spooled files with all of the text for a single line being in a single field, all of the text usually gets shifted to the right or down uniformly so all of the fields usually line up correctly.


How Host Print Transform (HPT) Handles the Unprintable Border When Printing *AFPDS Spooled Files

The AFPDS-to-ASCII Transform code within Host Print Transform (HPT) also handles the unprintable border when printing *AFPDS spooled files by taking any fields that begin within the unprintable border on the left side or the top side and moving them to the right or down until those fields start outside the unprintable border. Any fields that then extend into the unprintable border on the right side or the bottom side will then get truncated, so the entire field may not be able to be printed successfully.

However, if an *AFPDS spooled file is generated using DDS and if several different fields are used in a single line, OS/400 or i5/OS is much more likely to generate *AFPDS spooled files with several different fields within a single line. Some of these fields may start within the unprintable border, but some would also start outside the unprintable border. HPT only shifts the fields that being in the unprintable border, so you can end up with fields starting on the left side of the page being shifted to the right and fields starting in the middle of the page not shifting at all. This can therefore caused text for several fields to overlay and for fields to not always line up correctly.


Why This Is Working as Designed

This is working as designed and has been working this way since HPT started handling *AFPDS spooled files in V3R1M0 OS/400 via an enhancement PTF. Because all ASCII laser printers have an unprintable border and most IPDS-capable printers can print edge to edge by changing a setting in the IPDS MENU within the printer hardware settings, this was noted to be an issue when the AFPDS-to-ASCII Transform code was originally designed.

The solution chosen was the one that would give the best result to the largest number of customers. To shift the entire page away from the unprintable border on the left side of the page, the AFPDS-to-ASCII Transform code would have had to preprocess the entire page, including all overlays and page segments, because the fields in an *AFPDS spooled file can come in any order.

For example, an entire page could have fields that start outside the unprintable border, except for the last field on that page, which would cause the entire page to have to be shifted over or offset to the right. Preprocessing the entire page would require a large amount of memory and a large amount of processor time, both of which could make performance a large problem. If using preprinted forms, the entire spooled file rather than simply each entire page must be preprocessed in order to print correct on each page. The complete spooled file could be hundreds or thousands of pages. In this case, preprocessing the entire spooled file becomes nearly impossible.

Therefore, the fields that begin within the unprintable border are offset except when using a modified Workstation Customizing Object (WSCST) that is set up to use Raster Mode for *AFPDS spooled files.


Working Around This Issue by Changing the Position of the Fields in the Application or Printer File

The workaround is to set up an application (or externally described printer file) so that all fields start outside the unprintable or no-print border. The unprintable border is generally 1/6 inch on the top border and 1/4 inch on the left and right borders. Therefore, it is best to avoid starting fields in the first line when printing at 6 Lines per Inch (LPI) or in the first 2 lines when printing at 8 LPI. When printing at 10 or 12 Characters per Inch (CPI), it is best to avoid starting fields in the first 3 columns. When printing at 17.1 CPI, it is best to avoid starting fields in the first 5 columns. The recommended beginning column for each Characters per Inch (CPI) value are as follows:

Characters per Inch
(CPI) Value
Unprintable Border
in CPI
Earliest Starting
Column
5
5 / 4 = 1.25
3
10
10 / 4 = 2.5
4
12
12 / 4 = 3
4
13.3
13.3 / 4 = 3.325
5
15
15 / 4 = 3.75
5
16.7 or 17.1
16.7 / 4 = 4.175
6
18
18 / 4 = 4.5
6
20
20 / 4 = 5
6


Working Around This Issue by Specifying the Front Margin (FRONTMGN) Parameter

After changing the application to avoid printing within the unprintable or no-print border, the next best option is to specify Front margin (FRONTMGN) parameter in the *AFPDS printer file, or using the Override with Printer File (OVRPRTF) command, to move everything 0.2 inches down and to the right. For example:

CHGPRTF FILE(library-name/printer-file) FRONTMGN(0.2 0.2)

OVRPRTF FILE(POPRBUYPOP) FRONTMGN(0.2 0.2) OVRSCOPE(*JOB)

This causes Host Print Tranform (HPT) to shift everything on the page (including all text fields, overlays, page segments, and barcodes) to be shifted away from the unprintable or no-print border on both the top and left edge, and to shift everything on the page by the same amount.

This also causes Print Services Facility (PSF/400) to shift everything on the page by the same amount as Host Print Transform (HPT), so your spooled files should print with virtually the same positioning whether printing on an IPDS-capable laser printer or an ASCII (PCL5e-capable or IBM PPDS-capable) laser printer.


Working Around This Issue by Using Raster Mode for *AFPDS Spooled Files

Another workaround is to create a modified Workstation customizing object (WSCST) that is set up to use Raster Mode for *AFPDS spooled files. Then, use that modified WSCST object when printing to your ASCII laser printers. When the WSCST object is set up to use Raster Mode, the AFPDS-to-ASCII Transform code within HPT preprocesses each page into a raster or bitmap image. Then, if any field within that raster image starts within the unprintable border, HPT offsets the entire image to start outside the unprintable border and then sends the raster image for that page to the printer.

For more information on creating a modified WSCST object to use Raster Mode for *AFPDS spooled files, refer to the following documents:

N1010140: Instructions for Modifying a Workstation Customizing Object (WSCST)
N1010127: Raster Imaging for Host Print Transform (HPT)
N1010288: Using Host Print Transform (HPT) With an *LAN Device Description
N1019713: Using Host Print Transform (HPT) with a Remote Output Queue (RMTOUTQ)
N1019712: Using Host Print Transform (HPT) with an *LCL or *RMT Device Description
N1019470: Using Host Print Transform (HPT) with a PC5250 Printer Session at V5R1M0 and Above
N1019670: Using Host Print Transform (HPT) with a Third Party Emulation Package


Pre-Built Workstation Customizing Object (WSCST) for Using Raster Mode for *AFPDS Spooled Files

Rochester Support Center knowledgebase document New contains a save file with pre-built Workstation Customizing Objects (WSCSTs) for some of the most requested and most helpful customizations, including one pre-built WSCST object called PCL5RASTER that has the Raster Mode (RASTERMODE) tag setup to print *AFPDS spooled files in Raster Mode. The attached save file can be uploaded to an IBM® System i™ products system, and then the pre-built WSCST object can be restored to the QGPL library. Once restored, the PCL5RASTER WSCST object can be used, rather than following the instructions in document N1010127 to create your own modified WSCST object to turn on raster Mode for *AFPDS spooled files.

For more information, refer to the following document:

N1019007: Pre-Built Workstation Customizing Objects (WSCSTs) from IBM System i Remote Technical Support

Note: The PCL5RASTER WSCST object is based on the *HP4, *HP5, *LEXOPTRAT, and *INFOPRINT1140 manufacturer types and models (MFRTYPMDLs). The drawer selection tags in the PCL5RASTER WSCST object might not be needed for a specific printer model. If switching to use this pre-built WSCST object causes spooled files to pull from the wrong paper tray, then it would be better to retrieve the WSCST source code for the MFRTYPMDL setting currently used with your printer. Then follow the instructions in document N1010127 to change the RASTERMODE tag to use Raster Mode for *AFPDS spooled files, create the modified WSCST object, and use that WSCST object instead.


System Supplied MFRTYPMDLs that Automatically Use Raster Mode for *AFPDS Spooled Files

Certain system supplied manufacturer types and models are setup to automatically use Raster Mode for *AFPDS spooled files. These manufacturer types and models can be used as a quick test to determine if turning on Raster Mode will resolve the issues when printing *AFPDS spooled files on your printer. The manufacturer types and models (MFRTYPMDLs) include *IBM4076, *HP310, *HP320, *HP500, *HP520 and *HP540.

[{"Type":"MASTER","Line of Business":{"code":"LOB08","label":"Cognitive Systems"},"Business Unit":{"code":"BU054","label":"Systems w\/TPS"},"Product":{"code":"SWG60","label":"IBM i"},"Platform":[{"code":"PF012","label":"IBM i"}],"Version":"7.1.0"}]

Historical Number

325074876

Document Information

Modified date:
18 December 2019

UID

nas8N1019249