IBM Support

Printed Output Versus PDF Output Generated By Transform Services

Question & Answer


Question

Why does the printed spooled file look different than the PDF generated by Transform Services?
 



Cause

Transform Services, product 5770TS1, can be used to create a PDF file using CPYSPLF command.  It can be used to create a PDF file instead of a spooled file using OVRPRTF command.  Transform Services is used to create the PDF file generated when downloading or viewing spooled files in PDF format through IBM i Access Client Solutions Printer Output.  It can also be used through IBM i Access for Web.


1.  Printing applies a page size to the output, Transform Services does not.  



2.  Printers have unprintable margins, Transform Services does not.



3.  If the spooled file contains multiple languages, the printer device typically provides the Character Identifier (CHRID) to print the spooled file correctly.  There is not a printer device for Transform Services, thus the PDF may contain incorrect characters.

Answer

1A.  Printing applies a page size to the output, Transform Services does not.  For more consistent output, accurately describe the page size of the spooled file. 

The default page size of a spooled file is 11 inches long by 13.2 inches wide.  From the spooled file attributes:
Page size:
  Length . . . . . . . . . . . . . . . . :   66
  Width  . . . . . . . . . . . . . . . . :   132
  Measurement method . . . . . . . . . . :   *ROWCOL
Page length/width  . . . . . . . . . . . :   66  132
Lines per inch . . . . . . . . . . . . . :   6
Characters per inch  . . . . . . . . . . :   10
Overflow line number . . . . . . . . . . :   60
:
Font:
  Identifier . . . . . . . . . . . . . . :   *CPI
  Point size . . . . . . . . . . . . . . :   *NONE
:
Font character set:                                 
  Character set name . . . . . . . . . :   C0S0CR12 
    Library  . . . . . . . . . . . . . :     QFNTCPL
  Code page  . . . . . . . . . . . . . :   T1V10037 
    Library  . . . . . . . . . . . . . :     QFNTCPL
  Point size . . . . . . . . . . . . . :   *NONE    
Coded font:                                          
  Coded font name  . . . . . . . . . . :   X0CRE1    
    Library  . . . . . . . . . . . . . :     QFNTCPL 
  Point size . . . . . . . . . . . . . :   *NONE     
:
Page rotation  . . . . . . . . . . . . . :   *AUTO, 0, 90, 180, or 270

The page size is determined by dividing the page length by the Lines Per Inch (LPI) and page width by Characters Per Inch (CPI).  If a font identifier is specified, then the CPI of the font identifier is used in the calculation.  

If the width of the PDF is greater than the length, the PDF viewer may rotate the view regardless of the page rotation.  This does not occur in all PDF viewers.   A rotated view has been reported in free PDF viewers.  Paid PDF viewers may have configurable options to always display the PDF output in portrait mode.

NOTE:  If a font character set or coded font is specified, the CPI is set to 10.  The CPI of the font character set or coded font is not used in the calculation of the page size.  This could also cause the PDF viewer to rotate the PDF output regardless of the page rotation setting.  

Thus, the page size of the PDF is 13.40 x 11.00 inches. To confirm, when viewing the PDF, click on FILE / PROPERTIES. The Page Size should be listed toward the bottom. The viewer sees the width as 13.4 inches and rotates the output to landscape even though the page rotation is 0 for portrait.

66 length / 6 LPI = 11 inches long
132 width / 10 CPI = 13.2 inches
The Font Identifier is *CPI, thus the CPI value is used to calculate the page size.

When this spooled file is printed, computer output reduction (COR) will likely occur since page rotation is *AUTO (see NOTE).  The COR process sets the page size to letter, 8.5 by 11 inches, rotates the page 90 degrees for a landscape, and the font size is reduced so the output fits on the page.  

This same process does not occur when using Transform Services to create a PDF file.  The resulting PDF page size is 11 by 13.2 inches, using 6 LPI and 10 CPI.

NOTE:  COR is not performed when printing an *AFPDS spooled file to and ASCII printer configured to use Host Print Transform.

Refer to document Explanation of Computer Output Reduction (COR) and Options to Circumvent It for more details on accurately describing the page size for the spooled file.  The same applies for the PDF generated using Transform Services.



2A.  Printers have unprintable margins, Transform Services does not. For example, if the text of the spooled file is not lining up with an overlay, page segment, or AFP resource,  adjustments can be made to the Front margin (FRONTMGN) for offset down and offset across in the printer file, if needed.  In some cases, it may be necessary to change the starting position of the text in the DDS for the printer file.  For more information on this topic, refer to the sections titled Working Around This Issue by Changing the Position of the Fields in the Application or Printer File, and Working Around This Issue by Specifying the Front Margin (FRONTMGN) Parameter in How Host Print Transform (HPT) Handles the Unprintable Border When Printing *AFPDS Spooled Files.



3A.  If the spooled file contains multiple languages, the Character Identifier (CHRID) needs to be specified in the spooled file.  The default value for the CHRID in a printer file is *DEVD, which refers to the printer device description.  There is not a printer device description associated with Transform Services, thus the CHRID must be part of the spooled file.  If the CHRID for the printer file used to generate the spooled file is set to *SYSVAL, the QCHRID system value must be set correctly.  This is achieved by changing or overriding the printer file to specify the appropriate CHRID before generating the spooled file or PDF.  

Transform Services :  Additional Considerations for Generating PDF Files That Contain Both DBCS and SBCS Data has some additional information if the PDF will contain both DBCS and SBCS data.



If there are any issues with creating a PDF using Transform Services, ensure the latest Recommended Fixes for Print are applied to the system and the latest version of ACS is being used:

[{"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":"7.1.0"}]

Document Information

More support for:
IBM i

Software version:
7.1.0

Operating system(s):
IBM i

Document number:
6448518

Modified date:
13 September 2021

UID

ibm16448518

Manage My Notification Subscriptions