DocumentConverterEnumeratePossibleOutputFormats(DocumentFormat, NullableDocumentEngine) Method

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

Definition

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

Parameters

inputFormat  DocumentFormat
The format to convert from
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