Gets a value that indicate whether a PDF file is encrypted.
public static bool IsEncrypted(
string fileName
)
Public Shared Function IsEncrypted( _
ByVal fileName As String _
) As Boolean
public:
static bool IsEncrypted(
String^ fileName
)
fileName
The name of the PDF file.
true if the PDF file is encrypted; otherwise, it is false.
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:
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.
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.
Finally construct a PDFFile object with the filename and password (if any) and call its methods.
Help Collections
Raster .NET | C API | C++ Class Library | HTML5 JavaScript
Document .NET | C API | C++ Class Library | HTML5 JavaScript
Medical .NET | C API | C++ Class Library | HTML5 JavaScript
Medical Web Viewer .NET
Multimedia
Direct Show .NET | C API | Filters
Media Foundation .NET | C API | Transforms
Supported Platforms
.NET, Java, Android, and iOS/macOS Assemblies
Imaging, Medical, and Document
C API/C++ Class Libraries
Imaging, Medical, and Document
HTML5 JavaScript Libraries
Imaging, Medical, and Document