Controlling Word Conversion in Document Conversion Service


PEERNET Document Conversion Service is an off the shelf high volume solution for converting documents to high quality TIFF, JPEG, Adobe PDF, and other image formats. The Peernet Document Conversion Service Product is a very flexible, easy to navigate and robust conversion solution.

This article continues a series of articles highlighting the individual conversion options of each of the converters included with Document Conversion Service.

Controlling the Word Converter

The Word file converter has options to control what is visible when a Word document is printed, to provide passwords to handle protected documents and how the document is formatted when it is printed. You can also control what is printed in any date, time or file name field, a useful feature for e-Discovery applications.

A small sample of some of the available settings is listed below. A complete list of available settings can be found here.

Printing Options

Setting Name Values
Microsoft.Word.Document.PrintOut.Item Document(default)
DocumentAndMarkup
DocumentMarkup
DocumentProperties
Microsoft.Word.Document.PrintOut.PageType All(default)
Even
Odd
Microsoft.Word.ActiveWindow.View.RevisionsView ViewFinal(default)
ViewOriginal
MixedRevisions

Document Protection

Setting Name Values
Microsoft.Word.UnprotectPassword A string value containing the password to use to unprotect the Word document.
Microsoft.Word.OpenPassword A string value containing the password to use to open a password-protected Word document.
Microsoft.Word.WritePassword A string value containing the password to use to allow saving changes to the Word document.

Field Replacement

Setting Name Values
Microsoft.Word.ReplaceFieldDateWith The string value to place in the field.
Microsoft.Word.ReplaceFieldTimeWith The string value to place in the field.
Microsoft.Word.ReplaceFieldFileNameWith A string value to replace the auto file name field.

Telling Document Conversion Service about the Setting

How this setting is passed to Document Conversion Service depends on how you are using the service and its included conversion tools.

The samples shown below will configure Word documents to be printed with:

  • the document and any comments visible,
  • two pages per sheet,
  • and all date fields replaced with the string “***DATE***”.

For the command line tools and the PEERNET.ConvertUtility .NET library, the conversion settings are normally passed into the commands by supplying the name of a conversion profile file. This file is a simple XML file stored on your computer.

Sample Profile – Word Printed 2-Up with Comments and Date Replacement.

<?xml version="1.0" encoding="utf-8"?>
<Profile Type="0"
         DisplayName="TIFF 200dpi Optimized Color"
         Description ="Word Printed 2-Up with Comments and Date Replacement.">

  <Settings>

    <!--Word Specific  options -->
    <add Name="Microsoft.Word.Document.PrintOut.Item" Value="DocumentAndMarkup"/>
    <add Name="Microsoft.Word.PageSetup.TwoPagesOnOne" Value="True"/>
    <add Name="Microsoft.Word.ReplaceFieldDateWith" Value="***DATE***"/>

    <!-- 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>

If you are using the Watch Folder service included with Document Conversion Service, the collection of settings is passed as part of the definition for each input folder and is used for every file dropped into that folder.

By adding the following highlighted lines into the settings for the desired input folder, any Word documents dropped into that folder will use these settings when they are converted.

Sample Watch Folder Configuration – Word Printed 2-Up with Comments and Date Replacement

<WatchFolder Name="Word Files with Comments, 2-Up Printing and Date Replacement">
  <Settings>
    <!-- Folder options -->
    <add Name="InputFolder" Value="C:\PEERNET\WatchFolder\Input"/>
    <add Name="SearchFilter" Value="*.*"/>
    <add Name="IncludeSubFolders" Value="True"/>
    <add Name="DeleteInputSubFolders" Value="True"/>
    <add Name="StagingFolder" Value="C:\PEERNET\WatchFolder\Staging"/>
    <add Name="WorkingFolder" Value="C:\PEERNET\ WatchFolder\Working"/>
    <add Name="FailedFolder" Value="C:\PEERNET\WatchFolder\Failed"/>
    <add Name="CompletedFolder" Value="C:\PEERNET\WatchFolder\Completed"/>
    <add Name="OutputFolder" Value="C:\PEERNET\WatchFolder\Output"/>
    <add Name="PollingInterval" Value="15000"/>
    <add Name="DCOMComputerName" Value="localhost"/>
    <add Name="TestMode" Value="false"/>
    <add Name="NormalizeFilenames" Value="false"/>

   <!--Word Specific  options -->
    <add Name="Microsoft.Word.Document.PrintOut.Item" Value="DocumentAndMarkup"/>
    <add Name="Microsoft.Word.PageSetup.TwoPagesOnOne" Value="True"/>
    <add Name="Microsoft.Word.ReplaceFieldDateWith" Value="***DATE***"/>

    <!-- Output file options -->
    <add Name="Devmode settings;Resolution" Value="300"/>
    <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"/>
    <add Name="Save;Remove filename extension" Value="0" />
    <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;Fill order" Value="MSB2LSB"/>
    <add Name="Image Options;Fax" Value="0"/>
    <add Name="Image Options;Fax Profile" Value="0"/>
    <add Name="Image Options;Fax Resolution" Value="4"/>
    <add Name="Processing;Rotate landscape" Value="0"/>
  </Settings>
</WatchFolder>  

Previous article in this series:

Controlling PDF Conversion in Document Conversion Service

Read more about conversion settings in the previous blog entry Setting Conversion Settings in Document Conversion Service for an overview on conversion settings.