When printing documents, some converters may require more or less time than others at certain stages of the printing process. For instance, some applications may need more time to spool the document to the printer than others, or a particular converter is handling files that are consistently larger and need more time to complete. These settings are normally set globally in the Document Conversion Service Printer Pool section but can also be overridden on a per-converter basis if needed.

The converter factory for each converter uses the following settings to control the printing timeouts:

Setting Name

Value

COMRetryLaterMaxTimeout

Sets a time limit, in milliseconds, on how long to retry Office automation COM calls when automating returns the error RPC_E_SERVERCALL_RETRYLATER. Currently used only by Excel and should never need to be modified. The default value is 2000ms.

PrintSessionWaitTimeout

How long the converter factory will wait to get access to a printing session.

PrintSessionFirstJobTimeout

This setting is applied to the printing session used by the converter factory and determines how long the printing session will wait for a job to start spooling in the printer queue after a document is printed before releasing the printing session back into the printer pool.

PrintSessionAvailableTimeout

This setting is applied to the printing session used by the converter factory and determines how long to wait between jobs entering the queue before releasing the printing session back into the printer pool.

PrintSessionWaitOnSpoolingTimeout

How long the converter factory will wait for each job to start spooling in the printer queue.

PrintSessionWaitOnCompleteTimeout

The maximum amount of time the converter factory will wait for the document to finish printing in the printer queue.

UsesPrintingProtocol

This is true for all converter factories that print to the Document Conversion Service to convert the document, false for any converter factories that do not use the printer. In most cases this setting never needs to be modified.

MaxRetryAttempts

Controls the number of times to retry converting a document if it was not successful on printing. Minimum value is 0, meaning we will not retry, and the maximum number of retries is 5. The default is 2.

 

Setting this value in the converter settings will override this setting if set in the The Application Pool or in the Document Conversion Service Printer Pool section.

MaxSpooledPagesAllowed

Sets the maximum number of pages that are allowed to be printed/spooled. The default value is 0, meaning there is no limit. If a document exceeds this count, it enters an error state and no file is created. To limit how many pages to convert see the PageRange setting in General Converter Options.

 

Setting this value in the converter settings will override this setting if set in the The Application Pool or in the Document Conversion Service Printer Pool section.

 

This option can also be overridden on a per document basis using profiles as described in Creating and Customizing Profiles.

ZeroByteFiles

Determines if files with a size of zero (0 bytes) are skipped or failed when processed. When set to Fail, an error is produced. When set to Skip, the file is skipped and a message is produced instead of an error. Default behaviour is to fail the file.

 

These variables control the maximum amount of time to wait on the open and close calls to the converter to ensure the conversion threads are not blocked by the underlying application. These values are entered in microseconds (1 second = 1000 microseconds). If not specified the default value is 60000ms, and can be no smaller than 20000ms.

Setting Name

Value

DocumentOpenTimeout

The maximum amount of time to wait for the converter to open the document.

DocumentConvertTimeout

The maximum amount of time to wait for the converter to convert the document

DocumentCloseTimeout

The maximum amount of time to wait for the converter to close the open document.

DocumentCloseAllTimeout

The maximum amount of time to wait for the converter to close all open documents.

ApplicationCloseTimeout

The maximum amount of time to wait for the application to close.

Changing the Converter Timeouts

In most cases these timeouts should not have to be changed from the defaults provided.

Opening the Configuration File

Go to Start - All Programs - PEERNET Document Conversion Service 3.0 - Edit DCS Configuration File to edit the configuration file using the DCS Editor. The configuration file can also be opened in any XML editor and can be found here:

Configuration file location:

C:\Program Files\Document Conversion Service 3.0\Core\PNJobItemProcessor.exe.config

Configuring Converter Factories

The sample below shows both the Microsoft Word and Adobe Acrobat Reader converter factory definitions. The Adobe Acrobat Reader converter shown is overriding the PrintSessionWaitOnSpoolingTimeout with a timeout value of 10000ms (10 seconds). Both converters will use the UsesPrintingProtocol setting of true as defined in the global settings section as they

1.In the <PluginFactories> section, look for the <PluginFactory> section for the converter whose timeouts you want to adjust.

2.Set new timeouts as desired.

 

PluginFactories Configuration Section

<PluginFactories>

  <Factories>

    <PluginFactory Name="Microsoft Word"

                   Type="PEERNET.PNDocConv.Converters.PNWordConverter"

                   Assembly="PNWordConverter" AppFactory="Microsoft Word">

      <Settings>

        <!-- Add custom converter settings here -->

      </Settings>

    </PluginFactory>

 

    <PluginFactory Name="Adobe Acrobat Reader"

                   Type="PEERNET.PNDocConv.Converters.PNAcrobatReaderConverter"

                   Assembly="PNAcrobatReaderConverter"

                   AppFactory="Adobe Acrobat Reader">

      <Settings>

        <!-- Add any custom converter settings here -->

        <add Name="PrintSessionWaitOnSpoolingTimeout" Value="10000"/>

      </Settings>

    </PluginFactory>

 

  </Factories>

  <Settings>

    <!-- Global converter factory settings-->

    <add Name="UsesPrintingProtocol" Value="true"/>

  </Settings>

</PluginFactories>

Restoring the Configuration File

A backup copy of the original configuration file is stored in the following location for easy recovery.

Configuration file location:

C:\Program Files\Document Conversion Service 3.0\Core\Backup\PNJobItemProcessor.exe.config