public PDFDocument(
Stream stream
)
public:
PDFDocument(
Stream^ stream
)
stream
The stream containing an existing PDF file. This cannot be null and must support reading and seeking.
public PDFDocument(
ILeadStream stream
);
__init__(self,stream) # Overloaded constructor
The PDFDocument class encapsulates a PDF document on disk or stream and allows pages, objects and images to be read from the document.
stream must be kept alive as long as this PDFDocument object is alive and should not be disposed of. The stream can be safely disposed of after this PDFDocument is disposed.
stream must contain an existing and valid PDF file. If the PDF file is encrypted, then use the PDFDocument(Stream stream, string password) constructor. Determine whether a PDF is encrypted using the PDFFile.IsEncrypted method.
This method will initialize the members of PDFDocument as follows:
FileName: will be set to null.
Password: will be set to null.
IsEncrypted: will be set to false since this method cannot open an encrypted PDF file.
Resolution: will be set to the default value used to load PDF files set in the static DefaultResolution property.
Pages: will be initialized to list of PDFDocumentPage objects, one item for each page found in the PDF document. Not all the PDFDocumentPage members will be initialized since the PDFDocument constructor does not read any PDF objects by default. Refer to PDFDocumentPage for more information.
DocumentProperties: will be initialized with PDF document properties or metadata read from the file.
SecurityOptions: will be initialized with PDF document security and encryption options read from the file.
FileType: will be initialized with PDF document file type or version read from the file.
InternalLinks: will be initialized to null. The PDFDocument constructor will not read the PDF document structure by default. Instead, use the ParseDocumentStructure method to read the structure and populate the InternalLinks.
Bookmarks: will be initialized to null. The PDFDocument constructor will not read the PDF document structure by default. Instead, use the ParseDocumentStructure method to read the structure and populate Bookmarks.
Use PDFDocument Constructor(String) to create a PDF document from a file on disk.
Help Collections
Raster .NET | C API | C++ Class Library | HTML5 JavaScript
Document .NET | C API | C++ Class Library | HTML5 JavaScript
Medical .NET | C API | C++ Class Library | HTML5 JavaScript
Medical Web Viewer .NET
Multimedia
Direct Show .NET | C API | Filters
Media Foundation .NET | C API | Transforms
Supported Platforms
.NET, Java, Android, and iOS/macOS Assemblies
Imaging, Medical, and Document
C API/C++ Class Libraries
Imaging, Medical, and Document
HTML5 JavaScript Libraries
Imaging, Medical, and Document