jsPrinter Design and Description

jsPrinter is a non-visual dBL class which encapsulates basic Printer functionality. It supports retrieving printer characteristics and capabilities for any printer on the system, and for determining the system default printer. It also supports creating a device context for any printer on the system. The device context can subsequently be used for printing operations. jsPrinter also supports displaying the system UI dialogs for printer selection and page setup, and retrieving information selected by the user as well as the capabilities of the user-selected printer.

The 'spirit' of jsPrinter is to exist as a standalone object, typically as a 'child' object of another object. jsPrinter can also exist as a child of the global _app.sys object, similar to the way the frameWin is a child to the global _app object in the core product.

When instantiated, the jsPrinter object retrieves the system default printer name and characteristics, and saves this information to the various jsPrinter property members. Also at instantiation, if using the Registered Release version, the jsPrinter object retrieves a list of all printers currently configured on the system and saves the list in the aPrinters property member.