printerFile.isOpen()

API Overview

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

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.

Return Value

Boolean true if the file is opened, otherwise false.

Examples

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