Page tree
Skip to end of metadata
Go to start of metadata

API Overview

The printerFile.isOpen() API is used to determine if a printer file is open.

RPG Equivalent



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.

Return Value

Boolean true if the file is opened, otherwise false.


Manually open printer file
pjs.definePrinter("printer", { userOpen: true, overflowIndicator: "overflow" });
if (!printer.isOpen()) {;