The Black Ice Printer Drivers include a messaging interface for real time communication with a third party application. The messaging is synchronous and can be processed by a third party application. Developers can control or monitor the printing process through the messaging interface. The print job can be configured just before printing starts, such as output file name, output directory or file format. Also, the printing process can be monitored by page by page and action can be taken if the print job is finished or aborted.
The printer driver will send messages when the following events happen during the printing process:
- Changed Devmode (ChangeDevmode)
- Changed Devmode Extended (ChangeDevmodeEx)
- Start of Document (StartDoc)
- Start of Document Extended (StartDocEx)
- End of Document (EndDoc)
- End of Document Extended (EndDocEx)
- Start of Page (StartPage)
- Start of Page Extended (StartPageEx)
- End of Page (EndPage)
- End of Page Extended (EndPageEx)
- Image Passed in Memory (MemoryImage)
- Image Passed in Memory Extended (MemoryImageEx)
- OCR Data passed in Memory (OCRData)
- Abort
- Abort Extended (AbortEx)
In order to show the usage of the messaging interface of the printer driver, the Resource Toolkit includes the Message Capture Sample.
The Message Capture Sample shows how to capture the printer driver messages in an application (demonstrates Method 1, Method 2 and Method 3). To help Visual Basic, Delphi or other developers, the Resource Toolkit includes the BiPrnDrv.OCX that makes the process of capturing printer driver messages easy. The OCX will capture every printer driver message internally and will fire an OCX event for every message.
Using the Start Application feature of the Black Ice printer drivers along with the messaging interface provides a straightforward method of monitoring the printing process. Source code for the Message Capture without a Form Sample is available in C#, VB.NET, and C++.