DocumentConverterEnumeratePossibleOutputFormats(String, NullableDocumentEngine) Method

Enumerates possible output document formats for a given input document file.

Definition

Namespace: GleamTech.DocumentUltimate
Assembly: GleamTech.DocumentUltimate (in GleamTech.DocumentUltimate.dll) Version: 7.1.5
C#
public static IEnumerable<DocumentFormat> EnumeratePossibleOutputFormats(
	string inputFile,
	DocumentEngine? engine = null
)

Parameters

inputFile  String
The file name or path or extension (with or without leading dot) of the document file to convert.
engine  NullableDocumentEngine  (Optional)
The document engine to force. If not specified, the best document engine will be chosen automatically according to the input and output formats.

Return Value

IEnumerableDocumentFormat
An enumerable collection of output formats.

Example

Enumerate possible output document formats for a given input document file with EnumeratePossibleOutputFormats method and vice versa with EnumeratePossibleInputFormats method:

C#
foreach (var outputFormat in DocumentConverter.EnumeratePossibleOutputFormats(DocumentFormat.Docx))
{
    // ...
}

foreach (var outputFormat in DocumentConverter.EnumeratePossibleOutputFormats("InputFile.docx"))
{
    // ...
}

//---------------------------------------

foreach (var inputFormat in DocumentConverter.EnumeratePossibleInputFormats(DocumentFormat.Pdf))
{
    // ...
}

foreach (var inputFormat in DocumentConverter.EnumeratePossibleInputFormats("OutputFile.pdf"))
{
    // ...
}

See Also