GetPDFMACStatus

Security and signatures

Description

Returns the current PDF MAC validation or generation status for the selected document

Syntax

Delphi

Function TPDFlib.GetPDFMACStatus: Integer;

ActiveX

Function PDFlib::GetPDFMACStatus() As Long

DLL

int DLGetPDFMACStatus(int InstanceID);

Return values

0No PDF MAC is present
1A standalone PDF MAC is valid
2PDF MAC is required but the authentication code is missing
3The PDF MAC structure or CMS token is malformed
4The byte ranges do not cover the complete file correctly
5An algorithm or token location is unsupported
6The MAC key could not be unwrapped
7The document digest or authentication value does not match
8PDF MAC generation failed

Remarks

Protected documents are validated automatically during load after password verification and before page content is exposed

A failed load reports a specific code from 413 through 417 through LastErrorCode

See also

SetPDFMACEnabled, ValidatePDFMAC