Fine tuning the BiBatchConverter Service

 

The BiBatchConverter Service can be fine tuning through the BiAutoPrint.ini file for the better document conversion. The BiAutoPrint.ini file is located in the <BiBatchConverter installation>\BiCommandLineConverter folder. If the BiAutoPrint.ini file is not present, the built-in default values will be used. The following parameters can be configured:

 

[Helper settings]

 

ExitHelperTimeout=15000

Timeout interval in milliseconds for closing the helper application after the printing.

 

AutocadExitHelperTimeout=22000

Timeout interval in milliseconds for closing the AutoCAD helper application after printing. The AutoCAD typically needs more time to close.

 

OfficeWaitForApplicationToCloseUntilTerminate = 10000

This timeout should be lower with a few seconds than the ExitHelperTimeout, or the helper will be terminated before the helper could close office in some cases.

 

OfficeWaitForApplicationToCloseUntilTerminate2 = 2000

Timeout in milliseconds for office application to close itself after the helper sent out the close command.

 

AutoCadWaitForApplicationToCloseUntilTerminate = 15000

This timeout should be lower with a few seconds than the AutocadExitHelperTimeout, or the helper will be terminated before the helper could close office in some cases.

 

AutoCadWaitForApplicationToCloseUntilTerminate2 = 5000

Timeout in milliseconds for office application to close itself after the helper sent out the close command.

 

[Message capture settings]

 

StartFirstPageTimeout=240

Timeout in seconds waiting for the first page of the document to be printed.

 

PagePrintTimeout=120

Timeout in seconds waiting for all pages of the document - except the first - to be printed.

 

AutoCadStartFirstPageTimeout = 180

Timeout in seconds waiting for the first page to be printed of the AutoCad document

Default value is 180.

 

NOTE: It is recommended to increase the timeout interval if receiving “Timout interval elapsed” error during the conversion.

 

Delay interval before starting to print specified file formats in BiBatchConverter Service. The BiBatchConverter Service waits the specified delay before actually starting to process the document. The purpose of the Delay interval is to make sure that certain required processes used by the BiBatchConverter Service for conversions are started and running. The following delay intervals can be configured:

 

Word document delay interval before printing in BiBatchConverter Service in milliseconds

[Word Settings]

Delay in Service=1000

 

Excel spreadsheet delay interval before printing in BiBatchConverter Service in milliseconds

[Excel Settings]

Delay in Service=1000

 

PowerPoint document delay interval before printing in BiBatchConverter Service in milliseconds

[PowerPoint Settings]

Delay in Service=1000

 

Visio document delay interval before printing in BiBatchConverter Service in milliseconds

[Visio Settings]

Delay in Service=1000

 

RTF document delay interval before printing in BiBatchConverter Service in milliseconds

[RTF Settings]

Delay in Service=1000

 

TXT document delay interval before printing in BiBatchConverter Service in milliseconds

[TXT Settings]

Delay in Service=1000

 

TXT Margin in inches used for printing the document with Word. If not defined, the default right margin of Word will be used. TXT margin is not used when printing from Service.

 

Margin Top=0.5

Margin Left=0.5

Margin Bottom=0.5

Margin Right=0.5

 

Logging settings to create detailed log files and track the occurring issues.

 

[Log]

FilePath=<full path and filename>

Creates log file which includes the occurring errors and error codes from the Auto-print DLL module.

Enabled=<0 or 1>

Set 1 to enable, or set 0 to disable the Auto-print DLL logging.

 

PDF printing settings.

 

[PDF Settings]

Check password protection=<1 or 0>

Possible values: 0: Disabled, 1: Enabled. Default value is 1

 

By default, every Auto-print sample check if the document is password protected or not. If the document is not password protected then starts to process the document, otherwise skips the document and start to convert the next document in queue. In case of some problematic PDF documents, Auto-print reports incorrectly that the document is password protected. To be able to solve these issues, the password protection checking can be turned off:

 

Check for corrupted files=<1 or 0>

Possible values: 0: Disabled, 1: Enabled. Default value is 1

 

In certain cases, Auto-print incorrectly reports that the input PDF document is corrupted or damaged. One can for Auto-print to try to print these PDF documents by setting the Check for corrupted files to 0.

 

BiAutoPrint.ini structure and default settings:

 

[PDF Settings]

Check password protection=1

 

[Word Settings]

Delay in Service=1000

 

[Excel Settings]

Delay in Service=1000

 

[PowerPoint Settings]

Delay in Service=1000

 

[Visio Settings]

Delay in Service=1000

 

[RTF Settings]

Delay in Service=1000

 

[TXT Settings]

Delay in Service=1000 

Margin Top=0.5

Margin Left=0.5

Margin Bottom=0.5

Margin Right=0.5

 

[Helper settings]

ExitHelperTimeout=15000

AutocadExitHelperTimeout=22000

OfficeWaitForApplicationToCloseUntilTerminate = 10000

OfficeWaitForApplicationToCloseUntilTerminate2 = 2000

AutoCadWaitForApplicationToCloseUntilTerminate = 15000

AutoCadWaitForApplicationToCloseUntilTerminate2 = 5000

 

[Message capture settings]

StartFirstPageTimeout=240

PagePrintTimeout=120

AutoCadStartFirstPageTimeout = 180

 

[Log]

FilePath=C:\temp\BiAutoPrint_Log.txt

Enabled=1

 

Email Settings 

The following keys can be used to configure how EML and MSG files are printed:

 

[Email Settings]

Print Mode=0

Configures the service to print the email (email body with From, Sent, To and Subject field), email body, the attachments or both.

0: Print email and attachments (default)

1: Print the email only

2: Print email body and attachments

3: Print the email body only

4: Print the attachments only

 

Merge=1

Merge the email body and attachments to a single output file, or convert each file to a separate output file.

0: Print the email body and attachments separately

1: Merge the files into a single output file. (default)

 

Create Directory=0

Create a subdirectory for the output of each MSG and EML file.

0: Do not create a subdirectory (default)

1: Create a subdirectory (the name of the directory will be same as the name of the MSG/EML file)

 

Editing/Creating the BiAutoPrint.ini file

The BiAutoPrint.ini file must be in the same directory as the BiAutoPrint.dll and the BiPrintOffice.exe files.