Error processing SSI file
LEADTOOLS PDF (Leadtools.Pdf assembly)

Show in webframe

IsEncrypted Method






The name of the PDF file.
Gets a value that indicate whether a PDF file is encrypted.
Syntax
public static bool IsEncrypted( 
   string fileName
)
'Declaration
 
Public Shared Function IsEncrypted( _
   ByVal fileName As String _
) As Boolean
'Usage
 
Dim fileName As String
Dim value As Boolean
 
value = PDFFile.IsEncrypted(fileName)
public:
static bool IsEncrypted( 
   String^ fileName
) 

Parameters

fileName
The name of the PDF file.

Return Value

true if the PDF file is encrypted; otherwise, it is false.
Remarks

This method checks if the PDF file has been encrypted and protected with a password. If this is the case, then you must create a PDFFile object (or set the Password property) to the correct file before you can use the other methods of this object.

To load PDF files, you generally perform this:

  1. Call GetPDFFileType with pdfTypesOnly set to true and determine whether the return value is not PDFFileType.Unknown meaning a valid PDF file of any version.

  2. Call IsEncrypted to determine whether the file is encrypted (password protected), if so, instruct the user for the password to use with this PDF file.

  3. Finally construct a PDFFile object with the filename and password (if any) and call its methods.

Example

For an example, refer to PDFFile.

Requirements

Target Platforms

See Also

Reference

PDFFile Class
PDFFile Members

Error processing SSI file
   Leadtools.Pdf requires a PDF Pro, Pro Suite, Document, or Medical license and unlock key. For more information, refer to: LEADTOOLS Toolkit Features