DocumentConverterEnumeratePossibleInputFormats(String, NullableDocumentEngine) Method

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

Definition

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

Parameters

outputFile  String
The file name or path or extension (with or without leading dot) of the converted document file.
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