getAllPrinters(sa: StringArray input): Integer updating;
The getAllPrinters method of the Printer class fills a string array with the names of the available printers. The return value represents the number of printers in the array.
In JADE thin client mode, this method returns:
Printers local to the presentation client only, when executed on a presentation client
Printers attached to that server, when called from a method executing on the server node (which enables you to get a list of valid printers for the application server if you want to schedule report tasks for a reporting presentation client that runs on the application server)
The following example shows the use of the getAllPrinters method.
load() updating; vars stringArray : StringArray; begin // Creates a string array and populates it with the currently // available printers using the getAllPrinters method. The array // is then displayed in a combo box, allowing the user to select // a printer. create stringArray transient; app.printer.getAllPrinters(stringArray); comboBox.listCollection(stringArray, false, 0); ... // do some more processing here epilog // Deletes the transient string array object. delete stringArray; end;