easyPDF SDK Usermanual
PDF Creator Programming API  |  Download Free Trial  |  Contact Us to Purchase

IsEncrypted Method

Checks if a PDF file is encrypted.

bool IsEncrypted()
Function IsEncrypted() As Boolean
def IsEncrypted(self)
boolean IsEncrypted() throws PDFProcessorException
function IsEncrypted() 
BclPrcResult IsEncrypted(BclPDFProcessorHandle* pHandle, BclBool* poutVal);
Function IsEncrypted() As Boolean

Return Values

True if the given PDF file is encrypted; False otherwise.


Note that if a file is password protected, you cannot even open it without knowing the password.

Therefore you should consider using PDFProcessor.IsEncrypted instead. PDFProcessorHandle.IsEncrypted should only be used when a PDF file is already open.

Example Usage

Set oProcessor = CreateObject("easyPDF.PDFProcessor.8")
Set oProcessorHandle = oProcessor.OpenFile("C:\test\input.pdf", "C:\test\input.pdf")
isEncrypted = oProcessorHandle.IsEncrypted()
If isEncrypted Then
    MsgBox "This file is Encrypted."
End If