The information in this article applies to:
SUMMARYThere are some issues involved when designing an application to provide support for PostScript printers. The application must determine if the PostScript driver is available by using an accurate detection system. If an application generates PostScript directly, the PASSTHROUGH escape can be used to send the file. This must be done with care because the application is communicating directly with the printer. MORE INFORMATIONThe first issue is how to determine if a PostScript driver is an installed printer driver under Windows. An application cannot assume the PostScript driver is named PSCRIPT.drv because this forces PostScript driver vendors to use the same filename. The correct method is to run code similar to the following pseudocode: NOTE: In the event that GETTECHNOLOGY is not supported by some printer drivers, another method need to be used to determine if the printer is a PostScript printer. One possible method is to use QUERYESCSUPPORT on
escapes that are only implemented by PostScript printers. For example:
Similarly, you can determine a PCL printer by calling QUERYESCSUPPORT
on the following escape:
The second issue is how to print application-generated PostScript
code. The mechanism from a Windows-based application is through the
PASSTHROUGH escape. The PASSTHROUGH escape is documented in the
"Microsoft Windows Software Development Kit Reference Volume 2,"
Chapter 12. In addition to the documentation, one requirement on the
buffer passed is easy to miss; the first word must contain the length
of the buffer. The contents of the data sent by PASSTHROUGH can alter
the state of the printer.
To be safe, obey the following rules:
Additional query words: 3.00 3.10
Keywords : kbDSupport kbSDKWin16 |
Last Reviewed: July 2, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |