PRB: ResetDC Disables Duplex Printing on PCL Printers

Last reviewed: August 28, 1997
Article ID: Q173197
The information in this article applies to:
  • Microsoft Win32 Application Programming Interface (API) included 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 will eject 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 : GdiDc GdiPrn
Version : WINDOWS:95; WINDOWS NT:4.0
Platform : NT WINDOWS
Issue type : kbprb


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: August 28, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.