DocumentConverterEnumeratePossibleInputFormats(DocumentFormat, NullableDocumentEngine) Method

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

Definition

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

Parameters

outputFormat  DocumentFormat
The format to convert to.
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 input 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