PRB: ResetDC Disables Duplex Printing on PCL Printers

ID: Q173197


The information in this article applies to:
  • Microsoft Win32 Application Programming Interface (API), used with:
    • Microsoft Windows NT 4.0
    • Microsoft Windows 95


SYMPTOMS

When you call ResetDC to change any printer setting, it appears to disable Duplex (double-sided) printing when the target printer is a Hewlett Packard PCL printer.


CAUSE

PCL printers treat a change in paper size as a new print job that requires the printer to be initialized. This causes the printer to eject any page that is currently in the printer. The PCL printer drivers for Windows assume that the page size has been changed when ResetDC is called, unless the orientation of the page has changed.


RESOLUTION

To prevent having a page ejected when you call the ResetDC function, make sure that the function is called only between individual sheets of paper. Calling the ResetDC function before printing odd-numbered pages is sufficient for most applications that use duplex printing. However, some applications require that you change the page orientation on a page-by-page basis. In this case, you can call ResetDC between individual sheets of paper if the orientation has changed.


STATUS

This behavior is by design.


MORE INFORMATION

Note that when this problem occurs the print job continues and the sheets of paper are passed through the printer's duplexer, but the sheets are only printed on one side.

Because of the page size initialization requirement for PCL printers, Windows PCL drivers treat the ResetDC function differently. These drivers allow only the orientation to change between the front and back pages of a sheet of paper. This means that ResetDC ejects the page unless the orientation (and only the orientation) has changed from the previous page. Calling ResetDC with a DEVMODE buffer that has not changed causes the printer to eject the page.

In general, you should only call ResetDC when printer settings change. Calling ResetDC for every page when the DEVMODE buffer has not changed is unnecessary. By doing so, you risk having a page ejected from the printer, which has a high probability of occurring.

Additional query words: fail bug

Keywords : kbNTOS400 kbWinOS95 GdiDc GdiPrn
Version : winnt:4.0
Platform : winnt
Issue type : kbprb


Last Reviewed: November 30, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.