Controlling PDF 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.

Most of the converters included with Document Conversion Service have their own set of individual options for controlling how the documents are converted. This is the first article in a series of articles highlighting the different converters and what can be controlled in each.

Controlling the PDF Converter

PDF documents can contain markup. Markup consists of comments and annotations, and stamps that have been added to any of the pages in the PDF file. The default setting for Document Conversion Service is to print the document including any markup and stamps.

If you need to change this; perhaps to print the document without displaying any markup, there is a conversion setting to control this.

Setting Name Values
Adobe.PDF.PrintOptions.CommentsAndForms DocumentsAndMarkups (default) DocumentsAndStamps Documents

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.

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.

The sample profile below shows the added PDF converter setting configured to only print the document contents, and to ignore comments, annotations and stamps.

Sample Profile – PDF Printed With No Markup or Stamps

<?xml version="1.0" encoding="utf-8"?>
<Profile Type="0"
         DisplayName="TIFF 200dpi OptimizedColor PDF No Markup"
         Description ="TIFF image 200dpi, color, no markup for PDF">

  <Settings>

    <!—PDF Specific  options -->
    <add Name=" Adobe.PDF.PrintOptions.CommentsAndForms" Value="Documents"/>

    <!-- 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 line into the settings for the desired input folder, any PDF files dropped into that folder will use this setting when converting PDF files.

Sample Watch Folder Configuration – PDF Printed With No Markup or Stamps

<WatchFolder Name="PDF Files No Comments">
  <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"/>

    <!—PDF Specific  options -->
    <add Name=" Adobe.PDF.PrintOptions.CommentsAndForms" Value="Documents"/>

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

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