Product Information > JADE Encyclopaedia of Classes – Volume 2 > Chapter 1 - System Classes > getAllPrinters

getAllPrinters

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:

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;