printerFile.open()
API Overview
The printerFile.open() API is used to manually open a printer file defined with pjs.definePrinter().
 Printer files are automatically opened at the start of the program or function unless the 'userOpen' file configuration option is used.
RPG Equivalent
OPEN
Contents
Exception Handling
An Error instance with the following properties will be thrown:
- message - The IBM i message text.
- error - The message id.
help - The message help text.
Examples
Manually open printer file
pjs.definePrinter("printer", { userOpen: true, overflowIndicator: "overflow" }); printer.open();