4D v14.3

PRINTERS LIST

Home

 
4D v14.3
PRINTERS LIST

PRINTERS LIST 


 

PRINTERS LIST ( namesArray {; altNamesArray {; modelsArray}} ) 
Parameter Type   Description
namesArray  Text array in Printer names
altNamesArray  Text array in Windows: Printer locations Mac OS: Custom printer names
modelsArray  Text array in Printer models (Windows only)

The PRINTERS LIST command fills in the array(s) passed as parameter(s) with the names as well as, optionally, the locations or custom names and models of the available printers for the machine.

Note: If the printers are managed using a print server (spooler), the complete access path (under Windows) or the name of the spooler (under Mac OS) is returned.

Pass the name of a text array in the namesArray parameter. After command execution, this array will contain the names of available printers. Under Mac OS, this will be the fixed “system” names.

You can pass a second optional array, altNamesArray. The contents of this array will depend on the platform:

  • Under Windows, for each printer, you get its network location (or local port).
  • Under Mac OS, for each printer, you get its custom name, which can be modified by the user. This name can be used, for example, in dialog boxes.

The optional modelsArray parameter is used to get the model of each printer. This parameter can only be used under Windows.

Use the SET CURRENT PRINTER and Get current printer commands to modify or get the selected printer in 4D. You must pass them the names returned in the first array (namesArray)

Under Windows, the name of a printer can be modified manually at the operating system level. On the other hand, its location and model type are linked to its physical characteristics. Therefore, you can use the optional array values to check the characteristics of the selected printer — typically, you can check that all the client machines use the same printer.

Under Mac OS, this check can be carried out using the name of the printer (name of the print server), which is the same for each machine that is connected.

The system variable OK is set to 1 if the command has been executed correctly; otherwise, it is set to 0 and the arrays are returned empty.

 
PROPERTIES 

Product: 4D
Theme: Printing
Number: 789

The OK variable is changed by the commandMac OS specificWindows specific

 
HISTORY 

Modified: 4D 2004.1

 
SEE ALSO 

Get current printer
SET CURRENT PRINTER

 
ARTICLE USAGE

4D Language Reference ( 4D v12.4)
4D Language Reference ( 4D v11 SQL Release 6)
4D Language Reference ( 4D v14 R3)
4D Language Reference ( 4D v14 R2)
4D Language Reference ( 4D v13.5)
4D Language Reference ( 4D v14.3)
4D Language Reference ( 4D v14 R4)