#define ENABLEDUPLEX 28 |
short Control(lpDevice, ENABLEDUPLEX, lpInData, NULL) | |||
LPPDEVICE lpDevice; | |||
LPWORD lpInData; |
The ENABLEDUPLEX escape enables the duplex printing capability of a printer. A device that has duplex printing capability is able to print on both sides of the output medium.
lpDevice
Points to a PDEVICE structure specifying the destination device.
lpInData
Points to a 16-bit variable that contains one of the following values.
Value | Meaning |
0 | Simplex |
1 | Duplex with vertical binding |
2 | Duplex with horizontal binding |
The return value is 1 if the escape is successful. Otherwise, it is 0.
An application should use the QUERYESCSUPPORT escape to determine whether or not an output device is capable of creating duplex output. If QUERYESCSUPPORT returns a nonzero value, the application should send the ENABLEDUPLEX escape even if simplex printing is desired. This guarantees the overriding of any values set in the driver-specific dialog. If duplex printing is enabled and an uneven number of NEWFRAME escapes is sent to the driver prior to the ENDDOC escape, the driver will add one page eject before ending the print job.