The Black Ice Printer Driver Resource Toolkit/API includes a Batch Converter add-on to the printer driver written in C++, enabling developers to monitor a specified directory and/or email address and automatically convert any files in the specified directory or incoming emails.
The Batch Converter can be used by developers to convert Adobe PDF, Microsoft Office Documents (DOCX, DOC, DOCM, DOT, DOTX, TXT, RTF, XLSX, XLS, XLSM, XLSB, CSV, PPSX, XPS, PPS, PPSM, PPT, PPTX, PPTM, Visio), Image Files (TIF, JPG, JPEG, BMP, GIF, PNG), AutoCAD (DWG), XPS, HTM and HTML files.
The following sample and source code are included in the Resource Toolkit/API.
The Batch Converter sample application logs in to a specified POP3 email address then retrieves the emails from a given user account. The attachments of the emails (Word, Excel, HTML, text files, etc.) will be printed to the Black Ice printer driver which will result in converting the received documents into images (JPEG, PDF, TIFF, BMP, etc.).
Developers can also specify a directory for the Batch converter to monitor. Any supported file placed in the directory will be automatically converted into an image file by printing that file to the Black Ice printer driver. Settings such as the generated file format and output directory can be changed from within the sample as well.
Developers can modify this sample later on to fit their exact needs by adding additional features. The source code for this sample is included in the “\Sample Source Files\Sample Source Codes\C++\BatchConverter” folder of the RTK installation.