Convert to WordProcessing with advanced options

GroupDocs.Conversion provides the WordProcessingConvertOptions class to give you control over conversion result when convert to WordProcessing formats. Along with common convert options from base class WordProcessingConvertOptions has the following additional options:

  • Format specifies desired result document type. Available options are: Doc, Docm, Docx, Dot, Dotx, Rtf, Odt, Ott, Mobi, Txt.
  • Width specifies desired page width after conversion.
  • Height -  desired page height after conversion.
  • Dpi specifies desired page dpi after conversion.
  • Password whether the converted document will be password protected with the specified password.
  • RtfOptions specifies RTF specific options. RtfOptions class has single option ExportImagesForOldReaders - specifies whether the keywords for “old readers” are written to RTF or not. This can significantly affect the size of the RTF document.
  • Zoom specifies the zoom level in percentage.

The following code snippet shows how to convert to WordProcessing with advanced options:

using (Converter converter = new Converter("sample.pdf"))
{
    WordProcessingConvertOptions options = new WordProcessingConvertOptions
    {
        PageNumber = 2,
        PagesCount = 1,
        Format = WordProcessingFileType.Odt,
    };
    converter.Convert("converted.odt", options);
}