GetDocumentRevisionCount

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

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 TPDFlib.GetDocumentRevisionCount(Const InputFile, Password: WideString): Integer; Virtual;

ActiveX

Function PDFlib::GetDocumentRevisionCount(InputFile As String, Password As String) As Long

DLL

int DLGetDocumentRevisionCount(int InstanceID, const wchar_t* InputFile, const wchar_t* Password);
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