Conversion Options

The following example demonstrates using the ConversionOptions class. The ConversionOptions class is the class used to specify available options for a specific conversion. Options such as the output page orientation, page size, margins, unit type, and whether to append to a current document are all handled using the ConversionOptions class.

NOTE: Use the HtmlConversionOption object when calling the ConvertHtmlString method.

The following example Illustrates how to set a specific page size and margins for the output PDF. It then applies the conversion options to the Converter.Convert constructor as parameters which then convert the document.

ConversionOptions options = new ConversionOptions(720, 720, 72, true);
Converter.Convert(docxFilePath, pdfFilePath, options);
Dim options As ConversionOptions = New ConversionOptions(720, 720, 72, True)
Converter.Convert(docxFilePath, pdfFilePath, options)

Specific Converter Options

You can also use the following conversion options classes, depending upon the converter document type. The following lists the specific converters and conversion options available.

Converter Class Name Corresponding Options
ExcelConverter ExcelConversionOptions
HtmlConverter HtmlConversionOptions
ImageConverter ImageConversionOptionsTiffConversionOptions
PowerPointConverter PowerPointConversionOptions
RtfConverter RtfConversionOptions
TextConverter TextConversionOptions
WordConverter WordConversionOptions

In this topic