Page 1 of 1

to know if the printer prints in recto/verso

PostPosted: November 15th, 2005, 9:08 am
by Mirage
hello
I used the following code to know if the printer to declare by defect can print in recto/verso or not:
label1.caption:=inttostr(DeviceCapabilities(Device, Port, DC_DUPLEX, nil, nil));
but there remain a problem of execution "device and port not to declare" how I can declare device and port?
thank you

PostPosted: November 15th, 2005, 1:40 pm
by Kambiz
The following call gathers parameters of the selected printer by Printer.PrinterIndex:

Code: Select all
Printer.GetPrinter(Device, Driver, Port, DeviceMode);

where:

Code: Select all
Device, Driver, Port: array[0..MAX_PATH] of Char;
DeviceMode: THandle;