Fine tuning Auto-print Samples

 

The Auto-print DLL can be fine tuning through the BiAutoPrint.ini file for the better document conversion. The BiAutoPrint.ini file is optional. If the BiAutoPrint.ini file is not present, the built in default values will be used.

 

Applying the changes:

After editing or modifying the INI file, restart the application that is using the Auto-print SDK or the sample application to apply the changes.

 

The following parameters can be configured:

 

[Helper settings]

 

ExitHelperTimeout=60000

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

 

AutocadExitHelperTimeout=60000

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 “Timeout interval elapsed” error during the conversion.

 

Delay in Service applied before starting to print specified file formats in Auto-print Service sample. The Auto-print 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 Auto-print Service for conversions are started and running. The Delay in Service values in the INI file should NOT be changed without Black Ice Software Technical support assistance. The Delay in Service values are for internal use.

Word document delay interval before printing in Auto-print Service in milliseconds

 

[Word Settings]

Delay in Service=1000

 

 

[Excel Settings]

Excel spreadsheet delay interval before printing in Auto-print Service in milliseconds

Delay in Service=1000

 

If 0 use the specified print areas in the document for the printing. If 1 ignore print areas and print the entire document.

Ignore Print Areas=0

 

PowerPoint document delay interval before printing in Auto-print Service in milliseconds

 

[PowerPoint Settings]

Delay in Service=1000

 

Visio document delay interval before printing in Auto-print Service in milliseconds

 

[Visio Settings]

Delay in Service=1000

 

RTF document delay interval before printing in Auto-print Service in milliseconds

 

[RTF Settings]

Delay in Service=1000

 

TXT document delay interval before printing in Auto-print 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

 

Disable Internet Explorer compatibility mode

If the value is 0 then the Internet Explorer can use compatibility mode for the conversion. If the value is 1 then the compatibility mode is disabled and always the latest rendering engine is used in Internet Explorer for the conversion. It is recommended to set the value to 1, if experiencing incorrect output or missing graphic.

 

[HTML Settings]

Disable compatibility mode=0

 

 

Ignore Broken Images in HTML documents

If the value is 0 or not defined, then the software will attempt to print every image in the HTML document, even if the image is broken. In specific cases, this can cause Error Code 62 during the printing. If the value is 1, then the software will ignore the broken (non-existing) images while printing the HTML document. It is recommended to set the value to 1, if experiencing Error Code 62 while printing HTML documents.

NOTE: This option only takes effect on images with relative location. In cases if the image is pointing to a web URL (http://mywebsite/myimage.jpg) or contains BASE64 data, the software will attempt to print the image.

 

The default value is 0.

 

[HTML Settings]

Ignore Broken Images=0

 

 

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 checks 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.

 

Use Foxit Reader=<1 or 0>

Set it to 1 to use Foxit Reader for printing PDF documents. Make sure that the “Foxit Reader Path” key is set correctly.

If both the “Use Foxit Reader” and “Use Built-In PDF Converter” keys are set to 0, Adobe Reader is used for the conversion.

 

Possible values:

1: Use Foxit Reader.

0: Do not use Foxit Reader. Please also check the value of the “Use Built-In PDF Converter” key.

Default value is 0.

 

 

Use Built-In PDF Converter=<1 or 0>

Set it to 1 to use the built-in PDF converter for printing PDF documents.

If both the “Use Foxit Reader” and “Use Built-In PDF Converter” keys are set to 0, Adobe Reader is used for the conversion.

Please note the built-in PDF converter always prints the PDF pages as images.

 

Possible values:

1: Use the built-in converter.

0: Do not use the built-in converter. Please also check the value of the “Use Foxit Reader” key.

Default value is 0.

 

Foxit Reader Path=<full path and filename>

Full path to the Foxit Reader executable (FoxitReader.exe). Only used if the “Use Foxit Reader” key is set to 1.

 

 

 

BiAutoPrint.ini structure and default settings:

 

[PDF Settings]

Check password protection=1

 

[Word Settings]

Delay in Service=1000

 

[Excel Settings]

Delay in Service=1000

Ignore Print Areas=0

 

[PowerPoint Settings]

Delay in Service=1000

 

[Visio Settings]

Delay in Service=1000

 

[RTF Settings]

Delay in Service=1000

 

[TXT Settings]

;Delay in milliseconds for printing TXT document from service. Default value is 1000

Delay in Service=1000

 

;Select the utility used for printing text files.

;Available values:

;0: Print text files with Black Ice utility (The Auto-print SDK uses the BiPrintText.exe)

;1: Print text files with Microsoft Word (The Auto-print SDK uses the BiPrintOffice.exe), The Auto-print SDK uses the Microsoft Word for printing TXT file.

;Default value: 0

Print Text Files With Word=0

 

;Sets the file extensions that are considered text files.

;One can specify what file type or file extension should be considered to be printed as text file .TXT file such as .LOG, .DAT, .BAT, .123, .ABC, Etc...

;One can specify any file type or file extension to be printed as TEXT file.

Text File Extensions=txt,log,dat

 

;Sets the default font for printing text files (available only for BiPrintText.exe, “Print Text Files With Word=0”).

;Using a fixed-width (monospaced) font (e.g. Courier New, Consolas, Lucida Console, Fixedsys) is recommended.

;Proportional fonts (e.g. Arial) can also be used, but most text files are expected to be viewed with a fixed-width font.

;Default value: Courier New

Font Name=Courier New

 

;Sets the default font size for printing text files (available only for BiPrintText.exe, “Print Text Files With Word=0”).

;Default value: 11

Font Size=11

 

;Sets the unit for specifying margins when printing text files (available only for BiPrintText.exe, the “Print Text Files With Word=0 should be zero”).

;Available values:

;0: Set Units: 0.1*mm (available only for BiPrintText.exe, the “Print Text Files With Word=0 should be zero”).

;1: Set Units: 0.01*inch (default)

;2: Set Units: Pixel (available only for BiPrintText.exe, the “Print Text Files With Word=0 should be zero”).

Margin Units=1

 

;Sets the margins when printing text files.

;Default values: 75, 75, 100, 100

Margin Left=75

Margin Right=75

Margin Top=100

Margin Bottom=100

 

[HTML Settings]

Disable compatibility mode=0

 

[Helper settings]

ExitHelperTimeout=60000

AutocadExitHelperTimeout=60000

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 Auto-print 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)

 

Service Settings

 

[Service Settings]

OfficeConversionModeInService=< 1 or 2>

Default value is 2.

This parameter is for internal use only. Please do NOT modify!

 

 

Image Settings

 

[Image Settings]

Keep Original Image Size=<0 or 1>

Sets the scaling mode when converting images (TIFF, JPEG, PNG, BMP or GIF files).

Possible values:

0: Scale the images to the printer's paper size (default)

1: Keep the original size and orientation of the images

 

Keep Original Orientation=<0 or 1>

Sets the page orientation when converting images (TIFF, JPEG, PNG, BMP or GIF files).

This option can only be used if the " Keep Original Image Size" option is set to 0.

Possible values:

0: Use the printer's orientation settings, scale the images to fit on the page (default)

1: Change the printer's page orientation automatically according to the image orientation.

 

 

Debug Logging

 

To generate detailed debug log files for the Auto-Print SDK:

1.    To turn on debug logging, please add the following to the end of the BiAutoPrint.ini file

[Debug]

LogEnabled=1

 

2.    Create a directory C:\temp

3.    Reproduce the problem.

4.    Send us the log files generated in the c:\temp directory.

 

 

Editing/Creating the BiAutoPrint.ini file.

The BiAutoPrint.ini file must be in the same directory as the Auto-print sample applications, BiAutoPrint.dll and the BiPrintOffice.exe files.