DocumentConverterConvertTo(Stream, OutputOptions, NullableDocumentEngine) Method
Converts the document file to another format with the specified output stream and options.
For multi-page output conversions, only the first page will be saved to the stream as it would be
useless to save all pages to the same stream.
Namespace: GleamTech.DocumentUltimateAssembly: GleamTech.DocumentUltimate (in GleamTech.DocumentUltimate.dll) Version: 7.1.5
public DocumentConverterResult ConvertTo(
Stream outputStream,
OutputOptions outputOptions,
DocumentEngine? engine = null
)
Public Function ConvertTo (
outputStream As Stream,
outputOptions As OutputOptions,
Optional engine As DocumentEngine? = Nothing
) As DocumentConverterResult
- outputStream Stream
- The stream to write the converted document file.
- outputOptions OutputOptions
-
The output options which contains format and other options for the converted 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.
DocumentConverterResultA
DocumentConverterResult object that contains the result of the document conversion such as output file paths.
Converting to an output stream:
var documentConverter = new DocumentConverter(@"c:\SomeFolder\InputFile.docx");
// Convert "InputFile.docx" to Pdf written to outputStream
using (outputStream)
documentConverter.ConvertTo(outputStream, DocumentFormat.Pdf);
Dim documentConverter As New DocumentConverter("c:\SomeFolder\InputFile.docx")
' Convert "InputFile.docx" to Pdf written to outputStream
Using outputStream
documentConverter.ConvertTo(outputStream, DocumentFormat.Pdf)
End Using