New printer drivers

As of version 3.1.x we added new HPT and JSX printer drivers for SCS spool files. In this blog we will describe how and when to use them.

HPT - Host Print Transform

HPT driver is type of RAW driver but instead of receiving EBCDIC SCS based raw stream, data will be in PCL - ASCII/ANSI format suitable for PCL printers. Even this is legacy approach not generally needed by our system, some clients require printing of RAW data directly to printer. This comes in handy when integrating POS printers with our mobile application as POS printers requires raw text printing feature with embedded printer commands in data stream.

To use HPT driver, printer writer device on host system has to be configured properly with TRANSFORM parameter set to YES as shown on image below. Other parameters must be set to proper SCS conversion driver like *HP5 to generate PCL 5 stream.

If there is no proper IBM conversion for POS based printers one can use *WSCST conversion driver with custom WSCST object to generate pure ASCII/ANSI text spools. Other printer commands have to be inside SCS spool file.

NOTE: For more advance configuration, please refer to IBM manuals about WSCST - Workstation Configuration Objects and how to use them to generate proper SCS conversion for other types of printers.

JSX - JavaScript Extended

JSX driver is based on JavaScript scripting language. It is combination of JavaScript syntax with support for Java classes usage. JSX files are deployed to the server along other required resources. Purpose of JSX driver is to use scripting engine for complete SCS spool customization. For example, use script to process spool data line by line and convert data to JSON structure which combined with HTML template might create beautiful graphical spools. Also, we included HTML rendering engine which is able to produce graphical reports in various formats from PDF, JPEG, GIF, PNG, BMP or even SVG vector graphic from legacy spool files.

Code should be copied to the server in configuration folder at
[USER]/io.greenscreens/templates/[SPOOL_NAME]

Full code example is available on our git hub page here.

And samples of rendered spools... here