Click or drag to resize
Pdftools logo

ConverterConvertDocument Method

Convert all pages of a PDF document to a rasterized image


Namespace: PdfTools.Pdf2Image
Assembly: PdfTools (in PdfTools.dll) Version: 1.7.0+cfcc11b476b3e1eb4320f0f37269191f64e36bd8
Syntax
C#
public MultiPageDocument ConvertDocument(
	Document inDoc,
	Stream outStream,
	Profile profile
)

Parameters

inDoc  Document
The input PDF document
outStream  Stream
The stream to which the rasterized image is written.
profile  Profile

The profile defines how the PDF pages are rendered and what type of output image is used. Note that the profile's image options must support multi-page images (TIFF). For other profiles, the method ConvertPage(Document, Stream, Profile, Int32) should be used.

For details, see Profile.

Return Value

MultiPageDocument

The output image document. The object can be used as input for further processing.

Note that, this object must be disposed before the output stream object (method argument outStream).

Exceptions
ExceptionCondition
LicenseExceptionThe license is invalid.
IOExceptionWriting to the output image failed.
UnsupportedFeatureExceptionThe input PDF is a PDF collection (Portfolio) that has no cover pages.
UnsupportedFeatureExceptionThe input PDF contains unrendered XFA form fields. See Xfa for more information on how to detect and handle XFA documents.
GenericExceptionAn unexpected failure occurred.
ArgumentExceptionThe profile does not support multi-page output.
ProcessingExceptionThe processing has failed.
InvalidOperationExceptionInternal error has occured.
ArgumentNullExceptionif inDoc is .
ArgumentNullExceptionif outStream is .
ArgumentNullExceptionif profile is .
See Also