IBM Support

Forcing Spooled Files to Print on A4 Sized Paper Rather Than Letter Sized Paper

Troubleshooting


Problem

This document provides instructions for requesting A4 sized 210mm x 297mm (8.3 x 11.7 inch) paper by changing how Host Print Transform (HPT) does its page size selection.

Resolving The Problem

Note: This document was previously titled Letter to A4 Page Size Changes.

This document provides instructions for requesting A4 sized 210mm x 297mm (8.3 x 11.7 inch) paper by changing how Host Print Transform (HPT) does its page size selection. This is particularly useful when HPT is performing Computer Output Reduction (COR), which defaults to selecting Letter sized (8.5 x 11 inch) paper.

This is done by retrieving and modifying a Workstation Customization Table (WSCST) and changing the Page Size (PAGSIZE) tag for Letter sized paper to specify the printer control for A4 paper in the DATA field.

Note: Examples in this document are using the HP PCL5 printer language.

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

This document was last updated on 12 November 2013.


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 Customizing the PAGSIZE Tag 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(*WSCSTA4)
          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(*WSCSTA4)
        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 QGPL).
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.

Customizing the PAGSIZE Tag

Once you are editing the workstation customizing object source using either PDM or SEU, find the Page Size (PAGSIZE) tag where the page width (PAGWTH) is set to 12240 and the page length (PAGLEN) is set to 15840. The page size is calculated in 1440ths of an inch, so 12240 corresponds to a page width of 8.5 inches and 15840 corresponds to a page length of 11.0 inches. Therefore, this PAGSIZE tag is for Letter sized (8.5 x 11 inch) paper.

The Page Size (PAGSIZE) tag for A4 sized 210mm x 297mm (8.3 x 11.7 inch) paper has a page width of 11952 and a page length of 16848 (in 1440ths of an inch). This PAGSIZE tag is usually found immediately after the PAGSIZE for Letter sized paper.

The original PAGSIZE tags for both Letter and A4 sized paper are:

    :PAGSIZE
      PAGWTH=12240
      PAGLEN=15840
      DATA ='1B266C303241'X.
    :PAGSIZE
      PAGWTH=11952
      PAGLEN=16848
      DATA ='1B266C323641'X.

To force spooled files to print on A4 sized paper rather than Letter sized paper, copy the HP PCL5 control from the PAGSIZE tag for A4 sized paper ('1B266C323641'X) and use it in the PAGSIZE tag for Letter sized paper as well. Once changed, the PAGSIZE tags should look like the following:

:PAGSIZE
      PAGWTH=12240
      PAGLEN=15840
      DATA ='1B266C323641'X.
    :PAGSIZE
      PAGWTH=11952
      PAGLEN=16848
      DATA ='1B266C323641'X.

For additional information about controlling the page size, please refer to the following document:

N1010123: Controlling Page Size Requests

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


List of Standard Paper Sizes


Paper Size
Length and Width
(in inches)
Length and Width
(in millimeters)
Page Length (PAGLEN)
(in 1440ths of an inch)
Page Width (PAGWTH)
(in 1440ths of an inch)
A5
5.83 x 8.3 inches
148mm x 210mm
8352
11952
A4
8.3 x 11.7 inches
210mm x 297mm
11952
16848
A3
11.7 x 16.5 inches
297mm x 420mm
16838
23811
B5
7.2 x 10.1 inches
176mm x 250mm
10368
14544
B4
10.1 x 14.3 inches
250mm x 353mm
14570
20636
LETTER
8.5 x 11.0 inches
215mm x 278mm
12240
15840
LEGAL
8.5 x 14.0 inches
215mm x 355mm
12240
20160
EXECUTIVE
7.25 x 10.5 inches
184mm x 266mm
10440
15120
LEDGER
11.0 x 17.0 inches
278mm x 430mm
15840
24480

Note: The length and width in inches for the international (A5, A4, A3, B5 and B4) paper sizes, and the length and width in millimeters for the US (Letter, Legal, Executive and Ledger) paper sizes are all approximate.


HP PCL Paper Size Command

The following information on the HP PCL Page Size command is was taken from the HP PCL5 Printer Language Technical Reference Manual and the HP PCL5 Comparison Guide Addendum that are available from Hewlett Packard at hp.com.

Command String (ASCII / Hex)Command Name and Description
Ec & l # A

1B266C..41
Page Size Command

The Page Size command designates the size of the paper which in turn defines the size of the logical page.

PAPER:
# = 1 - Executive (7¼ x 10½ in.)
    2 - Letter (8½ x 11 in.)
    3 - Legal (8½ x 14 in.)
    6 - Ledger (11 x 17 in.)
    10 - JISExec (Foolscap)
    25 - A5 (148mm x 210mm)
    26 - A4 (210mm x 297mm)
    27 - A3 (297mm x 420mm)
    45 - JIS B5 (176mm x 250mm)
    46 - JIS B4 (250mm x 353mm)
    71 - Hagaki Postcard
    72 - Oufuku-Hagaki Postcard

ENVELOPES:
# = 80 - Monarch (Letter - 3 7/8 x 7½ in.)
    81 - Com-10 (Business - 4 1/8 x 9½ in.)
    90 - International DL (110mm x 220mm)
    91 - International C5 (162mm x 229mm)
    100 - International B5 (176mm x 250mm)
    101 - Custom

Default = 2 (Configurable from Control Panel)

Note: This information can also be found in the following document:

N1014523: List of Common HP PCL5 Commands used by Host Print Transform (HPT)

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

8690945

Document Information

Modified date:
18 December 2019

UID

nas8N1010143