Get default ConvertOptions for specific target format

GroupDocs.Conversion allows to get default convert options for specific target format by following the below steps:

  1. Create new instance of Converter class by passing source document path as constructor’s parameter
  2. Call GetPossibleConversions method of converter object
  3. Use the file extension or FileType as key to indexer of object received as value in previous step

The following code snippet shows how to get possible conversions of the source document:

using (var converter = new Converter("source.docx"))
    var possibleConversions = converter.GetPossibleConversions();
    var targetConversion = possibleConversions["pdf"];
    var convertOptions = targetConversion?.ConvertOptions;
    if (convertOptions != null)
        converter.Convert("converted.pdf", convertOptions);