4D v13.4

SET CURRENT PRINTER

Home

 
4D v13.4
SET CURRENT PRINTER

SET CURRENT PRINTER 


 

SET CURRENT PRINTER ( printerName ) 
Parameter Type   Description
printerName  String in Name of printer to be used

The SET CURRENT PRINTER command is designates the printer to be used for printing with the current 4D application.

Pass the name of the printer to be selected in the printerName parameter. To get a list of available printers, use the new PRINTERS LIST command beforehand.
If you pass an empty string in printerName, the current printer defined in the system will be used.

The SET CURRENT PRINTER command designates the virtual printer installed by the PDFCreator driver as the printing destination. 4D relies on the PDFCreator driver to facilitate the printing of PDF documents under Windows (see Integration of PDFCreator driver under Windows). To print a PDF document, in the printerName parameter, pass the name of the virtual printer that was installed by the PDFCreator driver. By default, the name of the virtual printer is "PDFCreator". However, this name may have been modified when the driver was installed. In order for 4D to automatically look for and use the name of the virtual printer, even if it has been customized, pass the PDFCreator Printer name constant in printerName. This constant is found in the Print Options theme.

The SET CURRENT PRINTER command must be called before SET PRINT OPTION, so that the options available correspond to the selected printer. On the other hand, SET CURRENT PRINTER must be called after PAGE SETUP, otherwise the print settings are lost.

This command can be used with the PRINT SELECTION, PRINT RECORD, Print form, and QR REPORT commands, and is applied to all 4D printing, including that in Design mode.
It is imperative for print commands to be called with the > parameter (where applicable) so that the specified settings are not lost.

If printer selection is carried out correctly, the system variable OK is set to 1. Should the opposite occur (for instance if the designated printer is not found), the system variable OK is set to 0 and the current printer remains unchanged.

 
PROPERTIES 

Product: 4D
Theme: Printing
Number: 787

The OK variable is changed by the command

 
INDEX

Alphabetical list of commands

 
HISTORY 

Created: 4D 2003
Modified: 4D v12

 
SEE ALSO 

Get current printer
PRINTERS LIST