Printer Class

The Printer class is a transient-only class that handles printing. A transient instance of the Printer class called app.printer is automatically created at run time.

Printing is a GUI operation that is available using jade.exe only. (The printer is automatically created only when the application is run from jade.exe; otherwise the value of app.printer is null.)

Client-side facilities only are available. Print facilities cannot be invoked from a server method.

You can create additional transient instances of the Printer class if you want to output to multiple printers or create multiple print tasks simultaneously.

If you are running JADE in thin client mode, the printing is performed on the presentation client using a printer attached to the presentation client workstation. (For details about optimizing performance when previewing print output in JADE thin client mode, see "Previewing Print Output", later in this section.)

The default printer is re-evaluated every time a new print task is initiated and JADE logic has not specifically set the printer name required. If logic sets a specific printer name (even if is the default printer), that printer continues to be used, regardless of any change to the default printer.

The following example shows the use of the setPrinter method to return to printing with the default printer.

vars
    prnt : String;
begin
    prnt := "";
    app.printer.setPrinter(prnt);
end;

For details about the Printer class constants, the properties and methods defined in the Printer class, defining report layouts, using the Print Progress dialog, free-format printing, and previewing print output, see the following sections.

Refer also to "Global Constants Reference", in Appendix A of the JADE Encyclopaedia of Primitive Types, for the global constants defined in the Printer category and to "JadePrintData Class", which is the abstract superclass of report output data classes that enable your print data to be stored or sent directly to a display device for previewing. (Use the Printer class setReport method to capture this output for storage, manipulation, and printing to meet your requirements.)

When you use the create instruction to create an instance of a transient form class that is referenced by a local variable, a GUI form is created. If you want to create a print form at run time that simulates the entire GUI process, use the GUIClass class createPrintForm method. The createPrintForm method creates a form that will not create an actual GUI form and will not apply a skin (which may change the size of the client area). See also "Portable Printing", later in this section.

An exception is raised if a printing operation (for example, calling the setPrinter method to set the output printer) is invoked from any of the following.

Object

(None)