←Select platform

PDFFile Constructor(string,string)

Summary

Initializes a new PDFFile object and associated it with the name of a PDF file and the password used to decrypt it.

Syntax

C#
VB
C++
public PDFFile( 
   string fileName, 
   string password 
) 
Public Function New( _ 
   ByVal fileName As String, _ 
   ByVal password As String _ 
) 
public: 
PDFFile(  
   String^ fileName, 
   String^ password 
) 

Parameters

fileName
The name of the file associated with this PDFFile.

password
The password associated with the PDF file at fileName.

Remarks

This constructor will initialize the properties of the PDFFile object as follows:

After the filename and optional password are set, call the Load method to populate the DocumentProperties and Pages properties of this PDFFile object with the values read from the file.

In certain situation, you may want to associate a PDFFile with a Postscript and not a PDF file. For example, to create a PDFFile object and call its Distill method to convert the Postscript file to PDF.

PDF files password must be 64 ASCII characters or less. This is defined by the PDFDocument.MaximumPasswordLength constant. LEADTOOLS will automatically convert the password string to ASCII and truncate if required.

Example

This example will determine whether a PDF file is encrypted, ask the user for a password then open it.

 

Requirements

Target Platforms

Help Version 19.0.2017.10.27
Products | Support | Contact Us | Copyright Notices
© 1991-2017 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.Pdf Assembly