←Select platform

PDFDocument Constructor(Stream)

Summary

Initializes a new PDFDocument from a specified stream containing a PDF file.

Syntax
C#
VB
C++
public PDFDocument( 
   Stream stream 
) 
Public Function New( _ 
   ByVal stream As Stream _ 
) 
public: 
PDFDocument(  
   Stream^ stream 
) 

Parameters

stream
The stream containing an existing PDF file. This cannot be null and must support reading and seeking.

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 20.0.2020.4.3
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2020 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.Pdf Assembly