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

HasUserPassword Method

Checks if a PDF file has a password.

bool HasUserPassword(string InputFileName)


Function HasUserPassword(InputFileName As String) As Boolean


def HasUserPassword(self, InputFileName)


boolean HasUserPassword(String InputFileName) throws PDFProcessorException


function HasUserPassword($InputFileName) 


BclPrcResult HasUserPassword(const BclPDFProcessorSettings* pSettings,
                             const wchar_t* InputFileName,
                             BclBool* poutVal);
Function HasUserPassword(InputFileName As String) As Boolean


Parameters

Return Values

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

Remarks

N/A.

Example Usage

Set oProcessor = CreateObject("easyPDF.PDFProcessor.8")
bProtected = oProcessor.HasUserPassword("C:\test\input.pdf")
If bProtected Then
    MsgBox "This file has an user password."
End If