Using the print functionality built into GuiXT WS.
You can use the GuiXT WS platform to print directly from WS scripts. The WS platform extends the functionality of WS by providing the ability to use printers through Webscript. The wsprint.dll contains a set of libraries that you can use to access and use printers from within GuiXT WS scripts. Currently, this functionality is in use in the field by several of Synactive's customers, most notably COMPANY_NAME. The wsprint functionality is available for use with the following Synactive solutions:
The wsprint functionality can be used with Synactive's Offline solution (for Offline 3.1.140.0 or later releases) in addition to the local and Server-based implementations already mentioned. This highlights one of the great strengths of WS - you can write a single script and implement it with multiple touchpoints.
To use wsprint, you must first load the necessary files using the load command. These files are as follows.
wsprint.js
If the wsprint.dll is in the home directory, the syntax to load the files is as follows.
load(‘wsprint’);
If the files are not in the home directory, you will need to specify the full path as shown below.
load('C:\\offline\\wsprint');
To initialize the wsprint object, perform the configuration required to print and to access printers, use the following code.
var a = new Printer();
To print to a local printer, you can use the following syntax.
var a = new Printer("printername");
If you are using a network printer, please note that you must supply the full path to the printer, as in the following example.
var a = new Printer("\\server\printername");