GetDocumentRevisionCountA

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 0, an empty string or False and sets LastErrorCode to 901 (PDFLIB_ERROR_SMALLBUSINESS_REQUIRED)

Description

The trailing A denotes the ANSI (char) DLL entry point; the ActiveX/COM surface exposes only the Unicode form. Behaviour is identical to GetDocumentRevisionCount and string arguments are interpreted using the current SetAnsiMode code page

Reports the number of incremental revisions stored in a PDF file, without loading it into the full in-memory document model

Revisions are numbered from zero (the original document) upward; each subsequent revision is an incremental update that appended objects to the file

Syntax

Delphi

Function DLGetDocumentRevisionCountA(InstanceID: Integer; InputFile: PAnsiChar; Password: PAnsiChar): Integer;

DLL

int DLGetDocumentRevisionCountA(int InstanceID, const char* InputFile, const char* Password);

Parameters

InputFileThe path of the PDF file to inspect
PasswordThe open password, or an empty string when the file is not encrypted

Return values

Returns the revision count, or 0 when the file cannot be read or its revisions cannot be followed

See also

GetDocumentRevisionStart, GetDocumentRevisionEnd, GetDocumentRevisionKind, GetDocumentRevisionChanges, GetSignatureRevisionIndex