IBM Support

Printing 132 Characters in Portrait Using Printer Definition File (PDT)

Troubleshooting


Problem

This document provides instructions for printing 132 characters wide report in portrait to a 8.5 x 11.0-inch paper by forcing a Printer Definition Table (or PDT) file to print at 17 characters per inch (CPI).

Resolving The Problem

This document provides instructions for printing 132 characters wide report in portrait to a 8.5 x 11.0-inch paper by forcing a Printer Definition Table (or PDT) file to print at 17 characters per inch (CPI). This is done by copying a Client Access/400-supplied Printer Definition File (or PDF) to a new PDF, modifying that PDF, and recompiling the new PDF to generate a PDT.

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

This document was last updated on 12 October 2011.




Deciding on the Appropriate PDF Source File

Note: Before proceeding, verify that the printer is capable of printing at 17 CPI.

In addition, you must find out which Printer Definition Table (PDF) to modify. If you are already using a PDT file for your PC5250 Printer session, then you can determine which PDT file you are using by going through File, Printer Setup, Select PDT. Copy the corresponding PDF file.

Copying the PDF Source File

Once you have selected which PDF you want to modify, you will need to copy this PDF to a new name (for example, HP4-132.PDF). We do not recommend that you modify the existing PDF because it may get damaged or it may get overwritten by PC5250 fixes or upgrades that may occur in future. Use Windows Explorer or Windows File Manager or 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 Client Access/400 you are using:

IBM 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 and Windows 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 Source File

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

The following changes are made to allow any spooled file specified with 10 CPI or 12 CPI to print at 16.7 CPI. We are changing the PDF to turn off CORing (Computer Output Reduction), using a 17 pitch font, and forcing portrait to fit a report with 132 columns in portrait.

Search for the string P12. Modify the right side of equation with the following:

Default Setting for HPLJ4.PDFP12              EQU 1B 26 6B 34 53
Modified Setting for HPLJ4.PDFP12              EQU 1B 26 6B 32 53

Search for the string P10. Modify the right side of equation with the following:

Default Setting for HPLJ4.PDFP10              EQU 1B 26 6B 30 53
Modified Setting for HPLJ4.PDFP10              EQU 1B 26 6B 32 53

Search for the string OVERRIDE_FORMATTED_PRINT?. Find a blank line, and press the Enter key to get a new line. Add the string in the second row (table below) 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=PORTRAIT

DRAWER2_ORIENTATION=PORTRAIT

Search for the string SET_VARIABLE_LINE_DENSITY. Modify the right side of equation with the following:

Default Setting for HPLJ4.PDFSET_VARIABLE_LINE_DENSITY=1B 26 6C decimal-characters 43
Modified Setting for HPLJ4.PDFSET_VARIABLE_LINE_DENSITY=1B 26 6C 37 2E 35 43
/*this changes the variable line density 7.5  to fit 64 lines on a page */

Search for the string SET_10_CHARACTERS_PER_INCH. Modify the right side of equation with the following:

Default Setting for HPLJ4.PDFSET_10_CHARACTERS_PER_INCH=P10
Modified Setting for HPLJ4.PDFSET_10_CHARACTERS_PER_INCH=P17

Search for the string SET_12_CHARACTERS_PER_INCH. Modify the right side of equation with the following:

Default Setting for HPLJ4.PDFSET_12_CHARACTERS_PER_INCH=P12
Modified Setting for HPLJ4.PDFSET_12_CHARACTERS_PER_INCH=P17

Search for the string SET_15_CHARACTERS_PER_INCH. Modify the right side of equation with the following:

Default Setting for HPLJ4.PDFSET_15_CHARACTERS_PER_INCH=
Modified Setting for HPLJ4.PDFSET_15_CHARACTERS_PER_INCH=P17

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

Default Setting for HPLJ4.PDFSET_GFID_0011=SFG 30 70 31 30 68 31 32 76 30 73 30 62 34 30 39 39 54
Modified Setting for HPLJ4.PDFSET_GFID_0011=SFG 30 70 31 37 2E 31 68 38 2E 35 76 30 73 30 62 34 30 39 39 54
/* this is originally fgid 252 */

For the next section, search for the string SET_FGID_0230. Font ID 230 gets selected as the default font if the IBM OS/400 or IBM i5/OS spooled file has CPI set to 15 and font ID set to *CPI. If any other font is being selected in the spooled file, modify the appropriate SET_GFID_xxxx equal to control codes for FGID 252 (17 CPI). Change the right side of the equation so the string looks like the 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 31 37 2E 31 68 38 2E 35 76 30 73 30 62 34 30 39 39 54
/* this is originally fgid 252 */


Creating the Modified PDT File

Once the changes have been made in the new PDF file, save the changes, and close the file. Open the PC5250 printer session. From File, Printer Setup, turn on Use PDT (assuming it is not already checked). Click on Select PDT, Convert PDF. The new PDF saved in the previous step is shown in the file list. Select that PDF by highlighting it. Click on the Convert button, and the PDF File Converter runs. Verify that the last statement of the compilation returns Table compilation successful. If you receive an error, you may have made an error in an entry. Go back 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 PRT132.PDT). Click on Close, Close, OK, OK, and then click on File, 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

9024856

Document Information

Modified date:
18 December 2019

UID

nas8N1010085