Click or drag to resize
Pdftools logo

DocumentOpen Method

Open a PDF document.

Documents opened with this method are read-only and cannot be modified.

Namespace: PdfTools.FourHeights.PdfToolbox.Pdf
Assembly: PdfTools.FourHeights.PdfToolbox (in PdfTools.FourHeights.PdfToolbox.dll) Version: 1.0.0
Syntax
C#
public static Document Open(
	Stream stream,
	string password
)

Parameters

stream  Stream

The stream where the PDF document is stored.

Read access is required.

password  String
the password to open the PDF document

Return Value

Document
the newly created document instance
Exceptions
ExceptionCondition
PasswordExceptionif the file is encrypted and the password is not valid.
IOExceptionError reading from the stream.
CorruptExceptionif the file is corrupt or not a PDF.
UnsupportedFeatureExceptionif the file is a PDF collection.
UnsupportedFeatureExceptionif the PDF contains unrendered XFA fields.
ConformanceExceptionif the document's conformance level is not supported
ArgumentNullExceptionif stream is .
See Also