Setting Conversion Settings in Document Conversion Service


Need: You have a specific requirement for the type of file you need to create, or you need to be able to vary the type of file you create on the fly.

Solution: All files created by Document Conversion Service use a collection of settings defined as name-value pairs to control how the output files are created.

  • These settings are most often combined into a conversion profile file, an XML file that is stored on your computer.
  • A default location for all profiles is created when you install Documents Conversion Service; files can be saved in that location and referenced by name or stored anywhere on your computer and referenced by full path name.
  • Several sample profiles for common conversion outputs are included with Document Conversion Service. These can be modified to suite or copied and edited as needed.
  • The settings shown below are just a sampling of the conversion settings that can be used

Sample Profile – TIFF 200dpi OptimizedColor.xml

<?xml version="1.0" encoding="utf-8"?>
<Profile Type="0"
    DisplayName="TIFF 200dpi OptimizedColor"
    Description ="Creates TIFF images at 200dpi. Color optimized to reduce file size.">
  <Settings>

    <!-- Output file options -->
    <add Name="Devmode settings;Resolution" Value="200"/>
    <add Name="Save;Output File Format" Value="TIFF Multipaged"/>
    <add Name="Save;Append" Value="0"/>
    <add Name="Save;Color reduction" Value="Optimal"/>
    <add Name="Save;Dithering method" Value="Halftone"/>

    <!-- TIFF Compression Options -->
    <add Name="TIFF File Format;BW compression" Value="Group4"/>
    <add Name="TIFF File Format;Color compression" Value="LZW RGB"/>
    <add Name="TIFF File Format;Indexed compression" Value="LZW"/>
    <add Name="TIFF File Format;Greyscale compression" Value="LZW"/>
    <add Name="JPEG File Format;Color compression" Value="Medium Quality"/>
    <add Name="JPEG File Format;Greyscale compression" Value="High Quality"/>
    <add Name="Image Options;Fax" Value="0"/>

  </Settings>
</Profile>

How this collection of settings is passed to Document Conversion Service depends on your use.

  • If you are using the Watch Folder, the collection of settings is passed as part of the definition for each folder(https://www.peernet.com/document-conversion-service/userguide/configuring_the_watch_folder_s.htm) and is used for every file dropped into that folder.
  • If you are using the DCS Command Line Tools the settings are passed by specifying the name of the XML file, either just the base name if the file is in the default profile location or the full path to a profile file you have saved elsewhere on your computer.
  • If you are using the PEERNET.ConvertUtility .NET library
    • The settings can be passed by specifying the name of the XML file same as for the command line tools or –
    • You can create the list of settings in your .NET code and pass that down.
    • The advantage of the profile is it can be changed without having to recompile your code, but creating the collection of settings in your code also allows you to dynamically change conversion settings on a per file or per folder basis.

The available settings are separated into categories:

  • General conversion options, such as page range
  • Settings to control the paper size and resolution of created image are listed under the Devmode settings collection.
  • Control the bit depth, color mode and dithering options from the Save collection.
  • Individual options for output files are listed in the collections for TIFF Options, PDF Options, PDF Security and JPG Options.
  • Control fax output from the collection of settings for Image Options.
  • Image processing such as trimming, cropping, resampling and copying.
  • Endorsements can be added to each page.
  • Individual options to control each converter. Some converters have more control over how their documents are printed than others.
    • The Word converter can control if the document or document and markup are printed, how revisions are shown if they are printed, it can change the margins and page layout, dates and filename fields can be replaced with custom strings, and much more.
    • The Adobe Reader converter can only control what is visible on the page when the PDF file is printed – document, document and stamps or document and markup.
    • See the section for each individual converter for their customizable settings.