Enabling print support in projects

As you develop a HATS project, you can establish a print session for the associated host application. When the HATS project is running on a WebSphere server, an end user of the application can also print data or display data that is formatted for printing.

When interacting directly with a host application, an end user activates a physical printer to print data from the application. When interacting with a HATS application, the end user does not activate a physical printer. Rather, an Adobe Portable Document Format (PDF) file is generated, which can be displayed in a Web browser. The PDF file can also be printed.

If a PDF viewer (Adobe Acrobat Reader) is not installed, the user will be prompted to save the file to disk.

This chapter describes the process for enabling print support in your HATS project and for using print support in the HATS Studio environment and in the WebSphere Application Server runtime environment (for deployed applications).

 

Configure the host print session on 3270 hosts

Before setting up print support for your HATS project, make sure that you (or the system administrator) have performed the following configuration for the host print session:

Refer to the documentation for your 3270 host software for details on how to perform these steps.

 

Defining print support for your project

For print support to be available for your project, obtain the host name and the port number for the Telnet server from the system administrator. Enter these values when you define the connection settings for your project.

 

For 3270 servers

To define print support when your HATS project interacts with a 3270 server, do the following:

To have more control over 3270 PDF print output format, you can add the following IBM WebSphere Host On-Demand connection session parameters to the list of connection settings:

CPI

Characters per inch. Specifies the number of characters printed per inch. On a Windows platform, three choices (10, 12, and 17) are available. The default value is 10.

LPI

Lines per inch. Specifies the number of lines per inch. On a Windows platform, five choices (2, 3, 4, 6, and 8) are available. The default value is 6.

MCPL

Maximum characters per line. Specifies the maximum number of characters per line, also called the Maximum Print Position or the Maximum Presentation Position (MPP). Enter a value from 1 to 255. The default value is 80.

MLPP

Maximum lines per page. Specifies the maximum number of lines per page, including the top and bottom margins. This value is also called Maximum Page Length (MPL). Enter a value from 1 to 255. The default value is 66.

RTLfile

Printing Right-to-left files. Specify "true" to print a file as it appears on a RTL screen. The default is "false."

For more information about refer to the IBM WebSphere Host On-Demand library at http://www.ibm.com/software/webservers/hostondemand/library.html

When an end user of the HATS application issues a command to print files, the HATS application sends a print job to the printer LU and the HATS runtime converts the print job to PDF format. Once the PDF is formatted, the end user can click View Print Jobs on the application keypad to see a list of queued print jobs.

Jobs in the queue can be viewed or deleted by clicking the appropriate icons. If view is selected and a PDF viewer program is installed, such as Adobe Acrobat, the viewer program will open with the specified file. The file can be printed or saved at this point. If a PDF viewer is not installed, the user is prompted to save the file (as a .pdf file). The saved file can viewed from another system that has a PDF viewer program installed.

The print file is stored on the WebSphere Application Server server. If you terminate the HATS application, you will lose all print files in the queue.

 

For 5250 servers

To define print support when your HATS project interacts with a 5250 server, click the Enable print support check box in your project settings. Provide a URL for the iSeries Access for Web Printer Output window. The default URL is http://hostname/webaccess/iWASpool, where hostname is the name of the 5250 server.

You do not need to perform any additional configuration. When an end user of the HATS application issues a command to print files, iSeries Access for Web converts the host print jobs into PDF format and facilitates the download to the end user. The end user can click View Print Jobs on the application keypad to display the iSeries Access for Web Printer Output window. In this window, the end user can select the following print options:

  1. PDF device type
  2. Paper size
  3. Destination

Refer to your iSeries Access for Web documentation for more information on these print options.

 

Providing documentation for end users

To facilitate use of your HATS project by end users, we recommend that you provide documentation on how to use the print support in HATS. Your documentation--provided either in the application's graphical user interface or in some other easily displayed form (perhaps a link in your template)--should describe:

To use HATS print support, an end user should follow these steps:

  1. Start the HATS application.
  2. Print the files.
  3. Click the View Print Jobs button. The Printer Output window displays a list of print jobs, if any exist.

    In the Printer Output window, the end user can click the links for their jobs to either View or Delete the print job. If the user clicks the view link, the print job is displayed as a PDF file in Acrobat Reader, if it is available. If not, the user is prompted to save the file to disk.

    While the print jobs are spooling, the user might see the file names for the print jobs in the printer output window, but View and Delete are disabled until the conversion to PDF format is complete.

 

Home