Using the Auto-print Multi-Threaded Service C# Sample

The Auto-print Multi-Threaded Service monitors the “Monitored Directory=c:\Auto Print Multi-Threaded Service\in\” directory and converts the files into “Converted Directory= c:\Auto Print Multi-Threaded Service\converted”. The conversion process generates a detailed log file that can be used to monitor the conversion process and for troubleshooting the C# service. The successful and failed document conversion will be registered in the Log file. The Log file can be opened any time in Notepad.

 

To configure the Auto-print Multi-Threaded Service Sample log file name, edit the logfile section in the "Auto Print Multi-Threaded Service C# Sample.ini" file. The "Auto Print Multi-Threaded Service C# Sample.ini" located in the directory <Auto-print SDK Installation folder>\<AutoPrint 32/64 bit>\Samples Directory.  If the "Auto Print Multi-Threaded Service C# Sample.ini" contains an inaccessible or non-existing folder, the log file will be generated into the Root directory of Drive C:\

 

Any changes to the Auto Print Multi-Threaded Service C# Sample.ini require the service to be restarted.

 

Example log file for a successful service startup and conversion:

 

04/06/18 18:18:36, Auto-print Multi-Threaded Service C# Sample 14.9.9.393

04/06/18 20:18:36, Log file: c:\Auto Print Multi-Threaded Service\Auto Print Multi-Threaded Service.log

04/06/18 20:18:38, Using printer driver: Black Ice ColorPlus

04/06/18 20:18:38, Using printer driver: Black Ice ColorPlus 2

04/06/18 20:18:38, Using printer driver: Black Ice ColorPlus 3

04/06/18 20:18:38, Monitored Directory: c:\Auto Print Multi-Threaded Service \in\

04/06/18 20:18:38, Successfully created Processed directory: c:\ Auto Print Multi-Threaded Service \processed\

04/06/18 20:18:38, Processed Directory: c:\Auto Print Multi-Threaded Service \processed\

04/06/18 20:18:38, Successfully created Failed directory: c:\ Auto Print Multi-Threaded Service \failed\

04/06/18 20:18:38, Failed Directory: c:\Auto Print Multi-Threaded Service \failed\

04/06/18 20:18:38, Successfully created Converted (Output) directory: c:\Auto Print Multi-Threaded Service \converted\

04/06/18 20:18:38, Converted Directory: c:\Auto Print Multi-Threaded Service \converted\

04/06/18 20:18:38, Profile: Using current printer settings.

04/06/18 20:18:38, Startup Delay: 10

04/06/18 20:18:48, Waiting for the spooler service...

04/06/18 20:18:48, Auto-print Multi-Threaded Service C# Sample started
04/06/18 20:18:51, Black Ice ColorPlus: Printing was started, c:\Auto Print Multi-Threaded Service \in\test1.xlsx

04/06/18 20:18:51, Black Ice ColorPlus 2:  Printing was started, c:\Auto Print Multi-Threaded Service \in\ test2.xlsx

04/06/18 20:18:51, Black Ice ColorPlus 3:  Printing was started, c:\Auto Print Multi-Threaded Service \in\ test3.xlsx

04/06/18 20:18:55, Black Ice ColorPlus: Printing was successful, Output file: c:\Auto Print Multi-Threaded Service \converted\test1.pdf

04/06/18 20:18:55, Black Ice ColorPlus 2: Printing was successful, Output file: c:\Auto Print Multi-Threaded Service \converted\test2.pdf

04/06/18 20:18:55, Black Ice ColorPlus 3: Printing was successful, Output file: c:\Auto Print Multi-Threaded Service \converted\test3.pdf

            04/06/18 20:19:18, Auto-print Multi-Threaded Service C# Sample waiting...

 

Here is an example for a failed conversion:

            04/06/18 20:27:05, Black Ice ColorPlus: Error printing: c:\Auto Print Multi-Thread Service\in\test4.xlsx: 56: The print spooler service is not running.