UtilityTools.ConvertFile Method

This method converts a document from one file type to another. For example, you can use it to convert an .RTF or .DOCX file to .HTML or .PDF.

When converting an RTF document to PDF, HotDocs Server uses a built-in PDF converter, which analyzes the codes contained in the RTF file and translates them to PDF. This differs from the method used by other third-party PDF converters, which rely on an instance of Microsoft Word on the server from which the document is "printed" using a driver to create the PDF document. PDF documents created using a PDF driver can typically handle a greater number of formatting variations, while the PDF conversion method used by HotDocs Server works best for documents with simpler formatting. If you use HotDocs Server's built-in PDF conversion, some formatting differences will exist between the original RTF and the PDF.

Syntax

public static void ConvertFile(string inPath, string outPath, HotDocs.Server.OutputOptions outputOptions)

Parameters Description
inPath The file name and path to the file that will be converted.
outPath The file name and path to the file that will be created by converting the input file.
outputOptions An OutputOptions object, which defines properties of the output file, such as its file format or meta data.