Leadtools.Pdf Namespace > PDFDocument Class > PDFDocument Constructor : PDFDocument Constructor(String) |
'Usage Dim fileName As String Dim instance As New PDFDocument(fileName)
function PDFDocument( fileName )
The PDFDocument class encapsulates a PDF document on disk and allows you to read the pages, objects and images from the document.
fileName must contain the name of an existing and valid PDF file on disk. If the PDF file is encrypted, then use the PDFDocument(string fileName, string password) constructor. You can check whether a PDF is encrypted using the PDFFile.IsEncrypted method.
This method will initialize the members of PDFDocument as follows:
Password: will be set to null.
IsEncrypted: will be set 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 of 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.
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, you must use the ParseDocumentStructure method to read the structure and populate InternalLinks.
Bookmarks: will be initialized to null. The PDFDocument constructor will not read the PDF document structure by default, instead, you must use the ParseDocumentStructure method to read the structure and populate Bookmarks.
For an example, refer to PDFDocument.
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2