IBM Support

Printing in Portrait with a Smaller Font Using Host Print Transform (HPT)

Troubleshooting


Problem

This document provides instructions for forcing operating system spooled files to print in portrait on 8.5 x 11.0 inch (letter sized) paper using Host Print Transform (HPT).

Resolving The Problem

This document provides instructions for forcing operating system spooled files to print in portrait on 8.5 x 11.0 inch (letter sized) paper using Host Print Transform (or HPT). This is done by retrieving and modifying a Workstation Customization Table (or WSCST) and changing the values in the Font Group Entry (FNTGRPE) and Paper Orientation (PRTORIENT) tags.

These instructions are designed to handle spooled files that are set up with a page rotation of 0 or 180 (so they are already printing portrait) or are set up with a page rotation of 90 or 270 (so they are printing landscape). To handle spooled files that are set up with a page rotation of *AUTO or *COR and that typically print using the Computer Output Reduction (or COR) feature and, therefore, print landscape and condensed, refer to the following document:

N1010170: Forcing Spooled Files to Print in Portrait instead of COR Using Host Print Transform (HPT)

This document was last updated on 24 October 2013.

Caution: These instructions are provided as is. Any assistance with editing the Workstation Customization Table must be done through a consulting agreement.


Basic Steps for Creating and Using a Workstation Customization Object

The following are the basic steps for creating and using a Workstation Customization Object (WSCST). Regardless of the particular issues you are attempting to resolve, these steps must always be taken. This information is intended to provide a 'quick start' to creating a WSCST object for users who have at least some familiarity with creating them and with configuring printers.

Note: Additional, in-depth details for creating a WSCST object can be found in the following document:

N1010140: Instructions for Modifying a Workstation Customizing Object (WSCST)

The following are the basic 'quick start' steps.

Step 1: Retrieve the WSCST source code. Type the following command on the operating system command line:

Important Note: Use the Manufacturer type and model (MFRTYPMDL) that is appropriate for your printer. Also, the Source member (in the following example, HP4) is a name that is appropriate to your customizing object. This is what you will be calling your workstation customizing object in Step 3.

RTVWSCST DEVTYPE(*TRANSFORM) MFRTYPMDL(*HP4) SRCMBR(HP4)
         SRCFILE(QGPL/QTXTSRC)

Press the Enter key.

Step 2: Edit the source code by using PDM or SEU:
oTo use PDM, on the operating system command line type the following:

WRKMBRPDM FILE(QGPL/QTXTSRC) MBR(HP4)

Press the Enter key. Select Option 2 to edit.
oTo use SEU, on the operating system command line type the following:

STRSEU SRCFILE(QGPL/QTXTSRC) SRCMBR(HP4)

Press the Enter key.
Make any changes necessary to the WSCST object source code. Refer to the following section Handling Spooled Files That Print Portrait and Are Being Truncated or Handling Spooled Files That Print Landscape (With the Page Rotation Set to 90 or 270) to make your changes, then save and exit. Continue with Step 3.

Step 3: Create the WSCST object using the CRTWSCST command. On the operating system command line type the following:

Important Note: Match the SRCMBR name from Step 1 to the WSCST object name that is created in this step.

CRTWSCST WSCST(QGPL/HP4) SRCFILE(QGPL/QTXTSRC)

Press the Enter key.

Step 4: Add the WSCST to the printer configuration by using the Change Device Print command (CHGDEVPRT), the Change Output Queue command (CHGOUTQ), or by changing the PC5250 printer emulation session configuration.
oTo add the WSCST to a device description, on the operating system command line type the following:

CHGDEVPRT DEVD(device_name) TRANSFORM(*YES) MFRTYPMDL(*WSCSTLETTER)
          WSCST(QGPL/HP4)

Press the Enter key.
oTo add the WSCST to a remote output queue description, on the operating system command line type the following:

CHGOUTQ OUTQ(queue_name) TRANSFORM(*YES) MFRTYPMDL(*WSCSTLETTER)
        WSCST(HP4)

Press the Enter key.
oTo add the WSCST to a PC5250 printer emulation session, do the following:

a In the PC5250 printer session, click on Communication > Configure.
b Click on the Setup button.
c In the Configure PC5250 Printer Emulation window, select the box next to Transform Print Data to ASCII on the iSeries and select the Printer Model value of *WSCST.
d In the same window, specify the name of the WSCST in the Customizing Object parameter and the library where it is found in the Library parameter (for example, Customizing Object HP4 and Library QGP).
e Click OK three times.
f Click File > Save to save the configuration.

Note: If any changes are made to the WSCST object source code after the CRTWSCST command has been issued, it is necessary to issue the CRTWSCST command again. The printer writer must be ended and restarted for the changes to take effect.

Handling Spooled Files That Print Portrait and Are Being Truncated

Search for the member name you used and type a 2 option (Edit) next to it, and press the Enter key. Next, find the FNTGRP (Font Group) and FNTGRPE (Font Group Entry) tags in the source member (you can type FNTGRP on the SEU command line, and press the F16 key). This entry tells HPT what controls to use to select a specific font for a range of font IDs (also referred to as a font group). HPT issues a particular font string based on the font group whenever it does not need to perform Computer Output Reduction (COR). For example, when the page rotation on the spooled file is set to 0, 90, 180, or 270 (rather than *AUTO or *COR).

The FNTGRPE tags in the workstation customization table are what tell HPT which controls to use for the different font ranges or font groups. There typically are no font group entries for 10, 12, or 15 CPI; therefore, the FNTGRPE entries listed will need to be added after the FNTGRP tag rather than modifying one of the existing FNTGRPE entries. Any FNTGRPE entries you choose should be added after the FNTGRP tag and before any existing FNTGRPE tags.

The following table list the FNTGRPE entries needed to force 10 CPI spooled files to 12 CPI, 15 CPI, or 17.1 CPI:

Note: Only one of the following FNTGRPE entries may be used at a time.

Current Font PitchDesired Font PitchFNTGRPE Entry to Be Added
10 CPI12 CPI:FNTGRPE
 MINFID = 1
 MAXFID = 65
 FNTSTR = '1B2873307031322E3068307330623054'X
 FNTEND = ''X
 FNTWTH = ''X.
10 CPI15 CPI:FNTGRPE
 MINFID = 1
 MAXFID = 65
 FNTSTR = '1B2873307031352E3068307330623054'X
 FNTEND = ''X
 FNTWTH = ''X.
10 CPI17.1 CPI:FNTGRPE
 MINFID = 1
 MAXFID = 65
 FNTSTR = '1B2873307031372E3168307330623054'X
 FNTEND = ''X
 FNTWTH = ''X.
10 CPI20 CPI:FNTGRPE
 MINFID = 1
 MAXFID = 65
 FNTSTR = '1B2873307032302E3068307330623054'X
 FNTEND = ''X
 FNTWTH = ''X.


The following table list the FNTGRPE entries needed to force 12 CPI spooled files to 15 CPI or 17.1 CPI:

Note: Only one of the following FNTGRPE entries may be used at a time.

Current Font PitchDesired Font PitchFNTGRPE Entry to Be Added
12 CPI15 CPI:FNTGRPE
 MINFID = 66
 MAXFID = 153
 FNTSTR = '1B2873307031352E3068307330623054'X
 FNTEND = ''X
 FNTWTH = ''X.
12 CPI17.1 CPI:FNTGRPE
 MINFID = 66
 MAXFID = 153
 FNTSTR = '1B2873307031372E3168307330623054'X
 FNTEND = ''X
 FNTWTH = ''X.
12 CPI20 CPI:FNTGRPE
 MINFID = 66
 MAXFID = 153
 FNTSTR = '1B2873307032302E3068307330623054'X
 FNTEND = ''X
 FNTWTH = ''X.


The following table list the FNTGRPE entry needed to force 15 CPI spooled files to 17.1 or 20 CPI:

Note: Only one of the following FNTGRPE entries may be used at a time.

Current Font PitchDesired Font PitchFNTGRPE Entry to Be Added
15 CPI17.1 CPI:FNTGRPE
 MINFID = 211
 MAXFID = 239
 FNTSTR = '1B2873307031372E3168307330623054'X
 FNTEND = ''X
 FNTWTH = ''X.
15 CPI20 CPI:FNTGRPE
 MINFID = 211
 MAXFID = 239
 FNTSTR = '1B2873307032302E3068307330623054'X
 FNTEND = ''X
 FNTWTH = ''X.

To create the WSCST object and implement it, perform steps 3 and 4 (above).

Handling Spooled Files That Print Landscape (With the Page Rotation Set to 90 or 270)

Find the PRTORIENT entry in the table (you can type PRTORIENT on the SEU command line and press the F16 key). This entry tells HPT what controls to use for the different printer orientations. If you have documents that are specifically set up to print in landscape (that have the page rotation set to 90 or 270 degrees), you must modify the PRTORIENT tags for LANDSCAPE and RTT270 to force them to print in portrait.

The PRTORIENT entries in the workstation customization table are what tell HPT which controls to use for the different printer orientations. The following table shows the original settings for an HP LaserJet 4 and the settings needed to force all output to print in portrait (HPT will no longer be printing in landscape even if specifically requested in the spooled file attributes):

Default Settings for HP LaserJet 4Modified Settings for HP LaserJet 4
:PRTORIENT
 ORIENT=PORTRAIT
 DATA ='1B266C304F'X.
:PRTORIENT
 ORIENT=LANDSCAPE
 DATA ='1B266C334F'X.
:PRTORIENT
 ORIENT=RTT180
 DATA ='1B266C324F'X.
:PRTORIENT
 ORIENT=RTT270
 DATA ='1B266C314F'X.
:PRTORIENT
 ORIENT=PORTRAIT
 DATA ='1B266C304F'X.
:PRTORIENT
 ORIENT=LANDSCAPE
 DATA =
'1B266C304F'X.
:PRTORIENT
 ORIENT=RTT180
 DATA ='1B266C324F'X.
:PRTORIENT
 ORIENT=RTT270
 DATA =
'1B266C324F'X.

To create the WSCST object and implement it, perform Steps 3 and 4 (above).

[{"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

12824231

Document Information

Modified date:
18 December 2019

UID

nas8N1019680