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

HasPassword Method

Checks if a PDF file has a password.

Function HasPassword(InputFileName As String) As Boolean

bool HasPassword(string InputFileName)

boolean HasPassword(String InputFileName) throws PDFProcessorException

Parameters

Return Values

True if the given PDF file has a password; False otherwise.

Remarks

The method does not make any distinction between user password and owner password.

Example Usage

Set oProcessor = CreateObject("easyPDF.PDFProcessor.8")
bProtected = oProcessor.HasPassword("C:\test\input.pdf")
If bProtected Then
    MsgBox "This file is password protected."
End If