Home > document converters, MOSS, SharePoint > Document Converters in SharePoint

Document Converters in SharePoint


Microsoft Office SharePoint Server 2007 includes a new feature that allows converting documents from one format (content type) to another.

Built-in Document Converters in

SharePoint includes several document converters that you can use out of the box:

  1. · .DOCX (Office Open XML) to HTML web page (also .DOCM to web page)

  2. · InfoPath to HTML web page

  3. · XML to HTML web page

Creating a Document Converter for MOSS

A document converter for SharePoint (MOSS) is a custom exe that SharePoint can call with command line arguments. The arguments specify the input, output, configuration and log files. 

Deploy a Document Converter to MOSS

The document converter for SharePoint must be packaged as a SharePoint Feature and deployed at the Web-application level.

A Feature in SharePoint is a unit of functionality that can be added/removed to a SharePoint server. A feature is defined in an XML file that describes the feature, its name, scope and required files. The feature definition XML and accompanying files must be placed in a folder in the C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\FEATURES folder.

Each feature needs to have a Feature.xml file that specifies the feature name, unique id, scope and the elements that comprise the feature.

Create a Folder for the Feature

Create the C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\FEATURES\Example folder on the SharePoint server.

Create a Feature Definition XML File

In the feature folder, create the Feature.xml as shown below.

<Feature xmlns="http://schemas.microsoft.com/sharepoint/&quot;

    Id="{guid}"

    Title="DOC to PDF Converter"

    Description="Convert documents from DOC to PDF."

    Scope="Web Application"> 

</Feature>

If you create more converters later on, pick a different GUID for the feature. The easiest way to generate a unique GUID is to use the Tools / Generate GUID menu in Visual Studio.

The ElementManifest element in the Feature.xml file refers to the Elements.xml file. This file contains the actual definition of the document converter. The definition of the document converter includes unique id, display name, the name of the executable to launch and the extensions of the source and destination content types.

In the feature folder, create the Elements.xml as shown below.

Content of the Elements.xml file.

<Elements xmlns="http://schemas.microsoft.com/sharepoint/"&gt;

    <DocumentConverter Id="{guid}"

        Name="DOC to PDF "

        App="exe file name"

        From="doc"

        To="pdf" />

</Elements>

If you create more converters later on, pick a different GUID for the converter. The easiest way to generate a unique GUID is to use the Tools / Generate GUID menu in Visual Studio.

Enable Document Converters

You need to enable document conversions in SharePoint, as they seem to come disabled by default.

Go to the Central Administration –>Application Management –>Configure Document Conversion screen and enable document conversions.

It is a good idea to check that the document conversion services are installed and running. In my case they were installed and running.

Go to the Central Administration –>Operations –>Services on Server and make sure that the Document Conversions Launcher Service and Document Conversions Load Balancer Services are installed and running.

Install the Document Converter Feature

Now we need to install the feature so the document converter becomes available in SharePoint. Execute the following command on the server:

"C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\STSADM.EXE" -o installfeature -filename Example\Feature.xml –force

Activate the Document Converter Feature

Now we need to activate the document converter, execute the following command on the server:

"C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\STSADM.EXE" -o activatefeature -name Example -url http://siteurl

Verify that the feature indeed was installed and activated

Copy the Document Converter Files!

Copy the executable files to C:\Program Files\Microsoft Office Servers\12.0\TransformApps

Make Sure the Converter is Enabled for the Site

Go to your SharePoint home page, click Site ActionsàSite Settingsà Modify All Site Settingsà Site Content Typesà DocumentàManage Document Conversion for This Content Type and make sure your document converter is enabled.

Advertisements
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: