IBM Support

Using Host Print Transform (HPT) to Create TIFF or GIF Output

Troubleshooting


Problem

This document provides information on converting spooled files to TIFF or GIF format using Host Print Transform (HPT). This can be done using a PC5250 printer session or a Remote Output Queue (RMTOUTQ) that points to Windows Print Queue on a PC or Windows Server.

Resolving The Problem

This document provides information on converting spooled files to either TIFF (Tag Image File Format) or GIF (Graphic Interchange Format) using Host Print Transform (HPT). This can be done using a PC5250 printer session or a Remote Output Queue (RMTOUTQ) that points to Windows Print Queue on a PC or Windows Server.

This document was last updated on 27 November 2012.

Notes:

oIBM supplied the QWPTIFFPB and QWPTIFFG4 Workstation Customizing Object (WSCST) as of R370 and R410 OS/400, and the QWPGIF WSCST object as of R440 OS/400. These system-supplied WSCST objects can be found in library QSYS.
oThe QWPTIFFPB, QWPTIFFG4 and QWPGIF WSCST objects are shipped with all supported versions of i5/OS or OS/400. They were initially shipped in V3R7M0 (R370) and V4R1M0 (R410) OS/400, so if these are needed at an earlier release, the WSCST objects will need to be created manually using information in the section titled Creating the QWPTIFFPB, QWPTIFFG4 and QWPGIF WSCST Objects on Old Versions of OS/400.
oThe QWPTIFFPB WSCST object uses Packbit compression, while the QWPTIFFG4 uses G4 compression.
oHost Print Transform (HPT) uses the QWPTIFFPB WSCST when printing with Raster Mode on PCL-capable printers, since PCL capable printers directly support TIFF images with Packbit compression.

The QWPTIFFPB, QWPTIFFG4 and QWPGIF WSCST objects can be used with a PC5250 printer session to generate a TIFF or GIF file on a PC by doing the following:
1.Use the Add Printer Wizard within Windows to configure the Generic Text Only printer driver to point to FILE:
2.Configure a PC5250 printer session that uses "Transform print data to ASCII on iSeries" with the Printer model set to *WSCSTLETTER, Drawer 1 and Drawer 2 set to "Letter sized (8.5 x 11 inch) paper" and the Customizing object set to QWPTIFFPB, QWPTIFFG4 or QWPGIF and the Customizing object library set to QSYS, then click OK all the way out.
3.Select File > Printer Setup on the PC5250 printer session menu bar, select the Generic Text Only printer driver, click on the Setup button, then click the OK button two times.
4.Select File > Save on the PC5250 printer session menu bar to save the printer session.
5.Whenever a spooled file is printed through the PC5250 printer session, Windows will pop up a dialog box so the user can type the directory path and name of the TIFF or GIF file to be created on the PC.
For more information, refer to the following documents:

N1018716: System i Access for Windows: Configuring a PC5250 Printer Session
N1019342: System i Access for Windows: Copying a *SCS Spooled File to a Text-Only PC File Using a PC5250 Printer Session
    • - Creating the QWPTIFFPB, QWPTIFFG4 and QWPGIF WSCST Objects on Old Versions of OS/400



      As stated above, the QWPTIFFPB, QWPTIFFG4 and QWPGIF WSCST objects are shipped with all supported versions of i5/OS or OS/400. They were initially shipped in V3R7M0 (R370) and V4R1M0 (R410) OS/400, so if these are needed at an earlier release, the WSCST objects will need to be created manually using information in this section.

      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 issue(s) 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 WSCST Source
      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 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.

      Default WSCST Source Code for QWPTIFFPB

      :WSCST DEVCLASS=TRANSFORM.

         :TRNSFRMTBL.

          :PRTDTASTRM DATASTREAM=TIFF_PB.
         :INITPRT DATA ='4D4D002A'X.      /* Standard TIFF identifier      */
         :RESETPRT DATA ='00000000'X.
      .EWSCST.


      The WSCST that you create (or the ones that IBM supplies in R370 and R410) cannot be used for printing, so there will not be a manufacturer type and model added for it. However, you could write an application program that utilizes the Host Print Transform API to convert an AFPDS spooled file to a TIFF image. For more information on the Host Print Transform API, refer to the API Reference (SC41-4801).

      One of the uses of this would be to convert an AFPDS spooled file to TIFF and present the image on an IBM 3489 Infowindow II display.

      • - 5250 Image/Fax


        5250 Image/Fax enables an operating system host-based application to control the displaying of image and fax on devices capable of displaying images/fax (for example, the IBM 3489 InfoWindow II). An IBM-provided Image/Fax Viewer Program is available. The Image/Fax Viewer can be integrated into an existing application easily. Source code and a demo program are included.

        Note: These programs are provided as is and do not include an IBM warranty and are not supported by the IBM Rochester Support Center. Contact your IBM representative for more information.

        Following are application programming implementations for 5250 Image/Fax:

        1.Integrate the IBM-provided Image/Fax Viewer Program into an operating system application.
        2.Modify the IBM-provided Image/Fax Viewer Program. This allows application programmers to provide the particular function, user interface and performance desired.
        3.Write an application program utilizing UDDS display file to enable 5250 Image/Fax. This is the most technical option, but offers the most flexibility.

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

      10022749

      Document Information

      More support for:
      IBM i

      Software version:
      6.1.0

      Operating system(s):
      IBM i

      Document number:
      644863

      Modified date:
      18 December 2019

      UID

      nas8N1019723

      Manage My Notification Subscriptions