The Black Ice printer drivers include Custom Plug-In support which is accessed through a dynamic linked library or DLL, and is loaded by the printed driver during printing. The printer driver calls pre-defined functions from the Plug-in at each phase of printing, and will not continue printing until the function returns. Developers will have full access to the DLL and can insert their own custom code to each DLL function to perform a variety of tasks as required by their application.
The Black Ice printer drivers can convert any file printed from any Windows application into an image or PDF file, which can then be faxed, archived, etc. as necessary. Print Jobs can be submitted to the Black Ice printer drivers from either custom applications or from typical applications, such as Notepad or Microsoft Office applications. When using custom applications, developers can modify their printing application to perform exactly as they require, however when printing from a third party application, developer’s are at the mercy of the application vendor and the printing user. Until now…
The Black Ice printer driver will load the Plug-In DLL with each print job and will pass to each DLL function a pointer to the devmode of the current print job. When the print job starts, at the Start Document phase, the Plug-In DLL can pass custom data to the printer driver. The custom data will be stored by the driver for the duration of the print job. The size of the custom data is not limited by the printer driver, however using a large data block is not recommended since the printing can be negatively impacted. Specifying a data block of no larger than 10-20 KB should be sufficient in most cases and will not have an impact on performance. The printer driver will return a pointer to the custom data in each additional function call to the Plug-in DLL. The Plug-in DLL can then modify or use the custom data in any way desired.
The BiStartDoc() function will be called once for each print job, when the printer driver starts generating the images. The printer driver will pass the DEVMODE to the function and will allocate memory for the custom data passed back by the function.
The BiEndDoc() function is called one for each print job when the printer driver each time the printer driver finishes processing a document. The printer driver will pass the DEVMODE, the custom data and the name of the group file. After the function returns the memory allocated for the custom data will be de-allocated.