The BiAutoPrint.ocx

The BiAutoPrint controls can be used by developers to print document directly from their applications, without any user interaction, using only a few function calls. In addition to providing automated printing, the OCX can also be used to programmatically change the default printer on the system. In order to print certain document types, third party application need to be installed.


Auto-print SDK Demo limitations

For using the Auto-print SDK Demo, Black Ice Printer Driver version 14.16 or higher is required. The Auto-print SDK full version can be used with any Black Ice Printer Driver.


The BiAutoPrint OCX naming convention:

On 32-bit operating systems: BiAutoPrint32.ocx for 32 bit applications.

On 64-bit operating systems: BiAutoPrint64.ocx for 64 bit applications.


How to use the BiAutoPrint.ocx

Methods of BiAutoPrint.ocx

Properties of BiAutoPrint.ocx

Supported Document Type

Required Third Party components

Auto-print Sample applications:

Auto-print C++ Sample

Auto-print C# Sample

Auto-print VB.NET Sample


Auto-print Service Sample applications:

Auto-print Service C++ Sample

Auto-print Service C# Sample


Multi-Threaded Converter applications:

Multi-Threaded Converter C# Sample


Using the BiAutoPrint controls is as easy as calling the BIAPInitialize() function to initialize the printing control and then calling the BIAPStartPrintingEx() or BIAPStartPrinting() function for each document you need to print. Pass the name of the file to be printed and the name of the target printer as parameters, and the BiAutoPrint control will do the printing for you.  After printing and the document is done, use the BIAPEndPrinting() function to signal the end of the printing to the control and a new document can be printed. The end of the printing can be detected by using multiple methods, one of them would be by monitoring the print queue using the existing Black Ice functionality.


A more efficient way to detect when printing has finished would be taking advantage of the Black Ice printer driver messaging interface to capture the EndDoc message that is sent by the printer driver when the document has finished printing. Messaging Interface with the Black Ice printer driver must run on a separate thread than the printing thread.