isPrinterOpen

isPrinterOpen(): Boolean;

The isPrinterOpen method of the Printer class returns true if any output has been directed to the printer or to print preview in the current application and the printer or print preview has not yet been closed; that is, an app.printer.print was issued but no app.printer.close has yet been performed. An exception is raised if this method is invoked from a server method.

The code fragment in the following example shows the use of the isPrinterOpen method.

if app.printer.isPrinterOpen = true then
    if self.printoutWanted then
        app.printer.close;
    else
        app.printer.abort;
    endif;
endif;