Get current printer
Get current printer : Text
Parameter | Type | Description | |
---|---|---|---|
Function result | Text | ← | Name of the current printer |
This command is not thread-safe, it cannot be used in preemptive code.
Description
The Get current printer command returns the name of the current printer defined in the 4D application. By default, on start-up of 4D, the current printer is the printer defined in the system.
If the current printer is managed using a print server (spooler), the complete access path (under Windows) or the name of the spooler (under macOS) is returned.
To obtain the list of available printers as well as additional information, use the PRINTERS LIST command. To modify the current printer, use the SET CURRENT PRINTER command.
Note: When the Generic PDF driver constant is used with SET CURRENT PRINTER, Get current printer returns "_4d_pdf_printer" or the actual name of the PDF driver.
Error management
If no printer is installed, an error is generated.