GetSignatureRevisionIndex

Security and signatures, direct access functionality

Requires the Small Business edition — in Delphi, C++Builder and Lazarus code create the library as TPDFlibSmallBusiness (unit PDFlibSmallBusiness) or TPDFlibEnterprise; the Small Business and Enterprise DLL and ActiveX builds provide it unchanged; the Single edition keeps the method, which returns -1 and sets LastErrorCode to 901 (PDFLIB_ERROR_SMALLBUSINESS_REQUIRED)

Description

Reports the zero-based index of the revision at which a signature ByteRange ends

Returns -1 when the signature does not end on a revision boundary, which means bytes were appended inside the range the signature claims to cover

Syntax

Delphi

Function TPDFlib.GetSignatureRevisionIndex(Const InputFile, Password, FieldName: WideString): Integer; Virtual;

ActiveX

Function PDFlib::GetSignatureRevisionIndex(InputFile As String, Password As String, FieldName As String) As Long

DLL

int DLGetSignatureRevisionIndex(int InstanceID, const wchar_t* InputFile, const wchar_t* Password, const wchar_t* FieldName);
int DLGetSignatureRevisionIndexA(int InstanceID, const char* InputFile, const char* Password, const char* FieldName);

Parameters

InputFileThe path of the signed PDF file to inspect
PasswordThe open password, or an empty string when the file is not encrypted
FieldNameThe fully qualified field name of the signature whose revision is requested

Return values

Returns the revision index, or -1 when the signature ByteRange does not end on a revision boundary

See also

GetDocumentRevisionCount, GetDocumentRevisionKind, ApplyPAdESLongTermValidation