IBM Support

Printing 198 Characters at 20 CPI Using Printer Definition File (PDT)

Troubleshooting


Problem

This document provides instructions for printing 198 characters wide report on rotated 8.5 x 11.0-inch paper (letter size paper in landscape) by forcing a Printer Definition Table (or PDT) file to print at 20 characters per inch (CPI).

Resolving The Problem

Important Note: This document discusses the IBM i Access for Windows, IBM System i Access, IBM iSeries Access, Client Access Express, and Client Access/400 products. These names essentially refer to the same product; however, the functionality and name changed over the last several releases. For the purposes of this document, the terms System i Access, iSeries Access, Client Access Express, and Client Access/400 may be used interchangeably. Where a difference is important, the version of the product is used to identify the differences.


This document provides instructions for printing 198 characters wide report on rotated 8.5 x 11.0-inch paper (letter size paper in landscape) by forcing a Printer Definition Table (or PDT) file to print at 20 characters per inch (CPI). This is done by copying a System i Access for Windows supplied Printer Definition File (or PDF) to a new PDF, modifying that PDF and recompiling the new PDF to generate a PDT.

This document was last updated on 9 April 2014.

Caution: These instructions are provided as is. Any assistance with editing the PDF is done only through a consulting agreement.

Deciding on the Appropriate PDF

Note: Before proceeding, verify that the printer is capable of printing at 20 CPI. Printers that support font scaling (such as the Lexmark Optra and HP LaserJet 4 Series printers) have the ability to print fonts at 20 CPI by shrinking the size of the font. Printers that do not support font scaling (such as the IBM/Lexmark 4019 or HP LaserJet III Series printers) do not have the ability to print fonts at 20 CPI, unless a 20-pitch font using a font card is installed.

In addition, find out which Printer Definition Table (PDF) to modify. If you are already using a PDT file for your PC5250 Printer session, determine which PDT file being used by going through File, Printer Setup, and Select PDT. The corresponding PDF file can be easily copied.

Copying the PDF

Once you have selected which PDF to modify, copy this PDF to a new name (for example, HP4-198.PDF). We do not recommend modifying the existing PDF because it may get damaged or it may get overwritten by PC5250 fixes or upgrades that may occur in future. Use Microsoft Windows Explorer or Windows File Manager or IBM OS/2 File Manager to copy the selected PDF to a new PDF. The PDF files are located in the following directory depending on the System i Access you are using:

IBM i Access for WindowsC:\Program Files (x86)\IBM\Client Access\Emulator\PDFPDT
IBM System i Access for WindowsC:\Program Files\IBM\Client Access\Emulator\PDFPDT
IBM iSeries Access for WindowsC:\Program Files\IBM\Client Access\Emulator\PDFPDT
Client Access Express for WindowsC:\Program Files\IBM\Client Access\Emulator\PDFPDT
Client Access/400 for Windows 95/NTC:\Program Files\IBM\Client Access\Emulator\PDFPDT
Client Access/400 for Windows 3.1C:\PCOMWIN\PDFPDT
Client Access/400 Optimized for OS/2C:\PCOMOS2\PDFPDT


Editing the PDF File

Use Notepad, the DOS editor, or the OS/2 system editor to open the new PDF file. If unreadable characters appear after opening the file, the PDT may have been copied rather than the PDF file.

Typically, PC5250 and PDT tables are set up so that if the page size of the IBM OS/400 or IBM i5/OS spooled file is too large to fit on the PC printer it replaces all fonts with a 17.1 pitch font (and most likely forces the page to rotate). The OS/400 or i5/OS page size of the spooled file is determined by the page length and width, the lines per inch, and the characters per inch (pitch) specified in the spooled file attributes.

The following changes are made to allow any spooled file specified with font ID 011 or 10 CPI to 20 CPI and font ID 230 or 15 CPI. The PDF is changed to turn off CORing (Computer Output Reduction) and use a 20-pitch font to fit a report with 198 column.

Search for the string SFG. Press the Enter key to get a new line. Add the string in the second row starting with MAR.

Default Setting for HPLJ4.PDFSFG              EQU 1B 28 73
Modified Setting for HPLJ4.PDFSFG              EQU 1B 28 73
MAR              EQU 1B 26 61 31 30 4C

Now, search for the string OVERRIDE_FORMATTED_PRINT?. Press the Enter key to get a new line. Add the string in the second row starting with AUTOMATIC_ORIENTATION?=NO

Default Setting for HPLJ4.PDFOVERRIDE_FORMATTED_PRINT?=YES    
Modified Setting for HPLJ4.PDFOVERRIDE_FORMATTED_PRINT?=YES     

AUTOMATIC_ORIENTATION?=NO
DRAWER1_ORIENTATION=LANDSCAPE

DRAWER2_ORIENTATION=LANDSCAPE

For the next section, search for the string START_JOB. At the end of that string add MAR so that the string looks like the second row below.

Default Setting for HPLJ4.PDFSTART_JOB=CUL CBP EC1
Modified Setting for HPLJ4.PDFSTART_JOB=CUL CBP EC1 MAR

For the next section, search for the string SET_FGID_0011. Change the right side of the equation so the string looks like second row.

Default Setting for HPLJ4.PDFSET_GFID_0230=SFG 30 70 31 35 68 39 76 30 73 30 62 34 30 39 39 54
Modified Setting for HPLJ4.PDFSET_GFID_0230=SFG 30 70 32 30 68 36 76 30 73 30 62 38 54 1B 26 6B 36 48
/* this is originally fgid 281 and added HMI to compress the fonts */

For the next section, search for the string SET_FGID_0230. Change the right side of the equation so the string looks like second row.

Note: Font ID 230 is chosen in the PC5250 if the operating system is sending down 15 CPI (character per inch) or equivalent font.

Default Setting for HPLJ4.PDFSET_GFID_0230=SFG 30 70 31 35 68 39 76 30 73 30 62 34 30 39 39 54
Modified Setting for HPLJ4.PDFSET_GFID_0230=SFG 30 70 32 30 68 36 76 30 73 30 62 38 54 1B 26 6B 36 48
/* this is originally fgid 281 and added HMI to compress the fonts */


Creating the Modified PDT

Once the changes has been made in the new PDF file, save the changes, and close the file. Open the PC5250 Printer session. Go to File, Printer Setup, and click to turn on Use PDT (assuming it is not already checked). Click on the Select PDT button, click on the Convert PDF button. The new PDF saved in the previous step appears in the file list. Select that PDF by highlighting it. Click on the Convert button. PDF File Converter runs. Verify the last statement of the compilation returns Table compilation successful. If you receive an error, there may be an error in an entry. Go to the PDF file, and correct the error.

If the PDF compiled successfully, it creates a .PDT file with the same name as the PDF file created in the earlier step (for example, if the PDF file is called LAND198.PDF, the PDT file is called LAND198.PDT). Click on Close, click on Close, click on OK, click on OK, and then click on File and Save so the current association with this new PDT is saved for the PC5250 Printer session.

[{"Type":"MASTER","Line of Business":{"code":"LOB57","label":"Power"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SWG60","label":"IBM i"},"Platform":[{"code":"PF012","label":"IBM i"}],"Version":"6.1.0"}]

Historical Number

8714027

Document Information

Modified date:
18 December 2019

UID

nas8N1010118