THotPDF.ValidatePDFMAC Method
Validates standalone or signature-attached PDF MAC data and returns structured failure diagnostics
Declaration
function ValidatePDFMAC(const FileName: TFileName; const Password: AnsiString; out ValidationInfo: THPDFPDFMACValidationInfo): boolean; overload;
function ValidatePDFMAC(const FileName: TFileName; const Password: AnsiString; const Options: THPDFPDFMACOptions; out ValidationInfo: THPDFPDFMACValidationInfo): boolean; overload;
Usage notes
THPDFPDFMACStatusdistinguishes authentication, modification, truncation, malformed-data and unsupported-algorithm failuresTHPDFPDFMACValidationInforeports coverage, algorithm, digest and authentication decisionsTHPDFPDFMACLocationdistinguishes standalone, signature-attached and unknown locations- No decrypted plaintext is exposed before authentication succeeds
pmsPolicyRejecteddistinguishes a validly parsed but disallowed digest or encryption mode- The result reports the detected digest, selected profile, policy decision and AES-256-GCM usage
PermissionsAuthenticatedconfirms that encrypted/Permsmatches/P, whilstMACRequiredByPermissionsreports the authenticated PDF MAC requirement bit- Attached validation resolves the active trailer
SigObjRef, requires exactly one matching signature field and verifies complete signatureByteRangecoverage Location,SignatureObjectNumber,SignatureGeneration,FullFileCoverageandSignatureDigestMatchedreport the verified attachment bindingpmsSignatureBindingFaileddistinguishes a raw signature-value digest failure from document modification
See ValidatePDFMACChain to authenticate every incremental revision, or PDF MAC Algorithm Agility and Policy Profiles for profile semantics