Command SET PRINTER Foundation
Sends screen output to the printer.
SET PRINTER on | OFF | <lToggle> SET PRINTER TO [<cDevice> | <cFileName> [ADDITIVE] ] SET PRINTER TO OBJECT <oXbpPrinter> BScope:!EF process wide
The command SET PRINTER ON sends all screen output occurring without specification of coordinates to the printer in addition to the screen. This includes output using ? or ?? as well as all commands supporting the option TO PRINTER. Screen output performed using the command @...SAY is unaffected. To send output performed using @...SAY to the printer, the output device is set beforehand to the printer using SET DEVICE TO PRINTER.
During printing, screen output can be turned off with SET CONSOLE OFF. This command has no effect on @...SAY commands.
Using the command SET PRINTER TO, the print output can be sent to a specific output channel or a specific output device. Valid device names are LPT1, LPT2, LPT3 (parallel ports), as well as COM1 and COM2 (serial ports) and finally CON and PRN. The default output device is PRN. For network printers, the format \\server\printername is also accepted as a valid device name. Furthermore, a file name can be specified to send the print output to a file. SET PRINTER TO without argument closes the file or the output channel and print output again occurs to PRN.
Print output is terminated using SET PRINTER OFF.
If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.