The information in this article applies to:
SUMMARY
When you are in the midst of development and concentrating on coding,
it is easy to lose sight of problem areas external to your
application. When diagnosing a printing problem in your application,
there are three major areas to be aware of:
MORE INFORMATIONEnvironment/Network IssuesCheck List:
Try printing to a local printer to ensure that the problem isn't related to your network. If your application prints correctly to a local printer and not to the network printer, the problem could be with incorrect network settings. Is Print Manager enabled? If not, try enabling Print Manager. Try turning off the Fast Printing Direct To Port option if it's on. For additional information about how these settings affect printing in Windows, please see the following article(s) in the Microsoft Knowledge Base: Q82746 General Information About Print Manager and Windows 3.1 Q82747 How Windows Prints to a NetworkMake sure there's enough disk space for the temp files that are created during printing. If the TEMP environment variable points to a network drive, make sure it has the correct permissions set on it. Printer and Driver IssuesCheck List:
Be sure to test printing on machines with different display drivers. Printer drivers normally do not support all output functions and rely on GDI to assist. In many cases, GDI in turn calls into the display driver to do the actual work. So, a bug in the display driver could show up during printing. For example, test with the standard VGA driver that shipped with Windows 3.1 and another display driver with more capabilities such as the 8514/a. Check for incorrect settings on the printer. Make sure the printer is set up correctly in Print Manager. Check that the correct properties, printer port, and so on, have been specified. It's possible the printer driver file is corrupt. Try removing the printer driver through Control Panel, deleting the printer driver file (along with deleting UNIDRIV.dll if appropriate) and reinstalling the driver through Control Panel. Application Coding IssuesCheck List:
Do you do banding (using the NEXTBAND and BANDINFO escapes) in your application? This is particularly important if you are doing a lot of graphics output or you are making calls to the SDK region functions. There have been problem reports concerning the region functions consuming GDI resources in nonbanding applications, and at this time the only known resolution is to implement banding in your application. If you don't do banding in your application then Windows does it for you by creating a disk-based metafile and then playing back the entire metafile into each printer band. Using the NEXTBAND escape eliminates the disk-based metafile so the printing process is greatly simplified. As an added benefit, you should notice an increase in performance. After adding the NEXTBAND escape, try optimizing your code even more using the BANDINFO escape. The sample program DIBVIEW demonstrates the correct usage of both the NEXTBAND and BANDINFO escapes. The Microsoft Developer Network (MSDN) CD article "Printing" is a must read for anyone implementing printing under Windows. Keep in mind that the article was written around the time Windows 3.1 was released when the problems with the Windows banding/metafile code were not known. Because of this, the article does not emphasize the importance of implementing banding in your application. If you are just learning about printing under Windows, or if you are considering implementing banding in your application, the Printing Self-Study Module has a great deal of information and sample code ready for your use. For more information about the Printing Self-Study Module, see the following application note in the Microsoft Knowledge Base: Appnote: PW0778: Printing Self-Study Module Here's a few other ideas:
Additional query words: appnote GdiPrnBanding
Keywords : kbWinOS310 kbDSupport |
Last Reviewed: July 7, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |