OpenPDF

Security and signatures

Requires the Enterprise edition — part of the Enterprise signature verification surface in TPDFlibSignatureVerifier (unit PDFlibEntSignVerify)

Description

Opens a PDF file on disk for signature verification.

The result distinguishes a missing file, an unreadable file, and a password mismatch, so callers can report the cause precisely. Only an srOkay result makes the document available to the enumeration and verification methods.

Syntax

Delphi

Function TPDFlibSignatureVerifier.OpenPDF(Const FileName: WideString; Const Password: WideString): TPDFlibSignerResult;

Parameters

FileNamePath of the PDF file to open
PasswordOpen password for encrypted documents; a wrong password yields srWrongPassword

Return values

srOkayThe document is open and ready for verification
srFileNotFoundThe file does not exist
srCannotReadThe file exists but cannot be opened for reading
srWrongPasswordThe document could not be opened, for example because the password did not match

See also

TPDFlibSignatureVerifier, TPDFlibSignerResult, EnumSignatures