←Select platform

PDFDocument Constructor(Stream)

Summary
Initializes a new PDFDocument from a specified stream containing a PDF file.
Syntax
C#
C++/CLI
Java
Python
public PDFDocument( 
   Stream stream 
) 
public: 
PDFDocument(  
   Stream^ stream 
) 

Parameters

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 
Remarks

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:

Use PDFDocument Constructor(String) to create a PDF document from a file on disk.

Requirements

Target Platforms

Help Version 23.0.2024.2.29
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2024 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.Pdf Assembly
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.