18.5. Creating Custom Document Converters

While the OOTB document converters provide a few options for converting files to HTML pages automatically, they surely won't meet every business need. What if a company has not yet upgraded to the Office 2007 clients and is still using Office 2003 or an earlier version? What about converting other file types to HTML? What if the generated file desired is not HTML but something else such as a *.PDF or *.XPS file?

Thankfully, Microsoft made the document converter infrastructure extensible, like so many other areas of SharePoint, enabling developers to create custom document converters to meet specific business needs. Developers can create converters that take any type of a file as an input and generate any file type as output. This is done by creating a custom console application. The custom converters may have special requirements to prompt both administrators and users for specific settings when configuring the document converter with a content type, as well as when users initiate the transformation process.

The following sections demonstrate how to create a document converter, as well as the special requirements involved when creating HTML pages for Publishing sites.

18.5.1. Creating the Document Converter

The document converter created in the following sections will take an XML file containing a dataset, shown in Listing 18-2, and transform it to an HTML table. When configured, the administrator needs to specify the formatting of the ...

Get Professional SharePoint® 2007 Web Content Management Development: Building Publishing Sites with Office SharePoint Server 2007 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.