Converting Files with Document Conversion Service

Command Line Utilities

Several command line utilities for converting files and folders are included with Document Conversion Service. These utilities can be called from the DCS command window, scheduled tasks, from batch files or any program that can call an external program.

Watch Folder Service

This included Windows service can watch multiple folders for any files placed in those folders, and will convert those files using the conversion settings for that folder. Multiple folders can be configured, each with their own conversion settings. This type of approach is often called a hot folder or drop folder. Files dropped into the folders are converted and the original file can be kept or discarded.

Additional features that are a part of the Watch Folder Service are:

Large volume batch conversion is built-in for dealing with existing folder structures with a large number of files.

Starting with version 3.0.009, processing Outlook message attachments can optionally be enabled as needed for each folder. This will extract and convert any attachments in Outlook Message files (*.msg), as well as the original email message in the file.

Clustering can be enabled on any folder as of version 3.0.010. Clustering allows multiple servers running Document Conversion Service  and Watch Folder Service to process files from the same watched folder. This can lead to higher conversion throughput and also allows for fail over should one of the servers have to be taken offline.

Beginning with version 3.0.010, separate post-processing for success and failure can be enabled for each folder.

The ability to automatically create unique file names and flatten folder structures was added with version 3.0.019.

The Watch Folder Service is also included as one of the open source samples to allow for further custom processing of the converted files when completed.

Desktop Conversion Applications

Two desktop conversion applications are supplied as part of the Document Conversion Service and Document Conversion Service Client Redistributable install.

The Drop Files Converter Desktop Application- provides a drop area in which to drag and drop files and folders to be converted. The type of file to be created and where it is stored can be customized. Advanced options allow remote conversions and the ability to run a command on each newly created file when the conversion has completed.

The Convert File Application - a simple interface for selecting and converting a single file at a time. The type of file being created is determined by the chosen profile of settings and remote conversion can also be done. This desktop application is also included as open source sample code.

Sample Programs

Both the Watch Folder Service and the Convert File application are included with Document Conversion Service as sample projects. While these samples can be used on their own, or as a starting point to integrating Document Conversion Service into your own applications, there is no warranty, implied or otherwise, of merchantability or fitness for a particular purpose.

The Samples folder can be opened by going to Start - All Programs - PEERNET Document Conversion Service 3.0 - Samples - Open Samples Folder. The samples can  be edited in this location but if you wish to keep the original source code, copy its folder to another location and edit that project.

The Convert File Application

This sample demonstrates using the provided .NET library, PEERNET.ConvertUtility.dll to convert a single file. It is provided in both C#.NET and VB.NET.

Like the command line utilities, the .NET library also uses a conversion profile, an XML file of name-value pairs, to describe the output. The .NET library methods can also take an IDictionary<String, String> list of settings instead of the profile. Document Conversion Service includes a set of common conversion profiles; see the section Conversion Settings for more details, and instructions on creating your own custom profiles.

The Watch Folder Service Sample

This is an advanced sample in C#.NET that demonstrates using the PNDocConvQueueServiceLib COM object from a service in a multithreaded environment. It demonstrates a service watching a drop folder for files and converting those files on demand using Document Conversion Service.