ExtractDocumentRevision
Page manipulation
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 and sets LastErrorCode to 901 (PDFLIB_ERROR_SMALLBUSINESS_REQUIRED)
Description
Writes an earlier revision of the document to a new file
Syntax
Delphi
Function ExtractDocumentRevision(RevisionIndex: Integer; Const OutputFileName: WideString): Integer; Virtual;ActiveX
Function PDFlib::ExtractDocumentRevision(RevisionIndex As Long, OutputFileName As String) As LongDLL
int DLExtractDocumentRevision(int InstanceID, int RevisionIndex, const wchar_t* OutputFileName);
int DLExtractDocumentRevisionA(int InstanceID, int RevisionIndex, const char* OutputFileName);Parameters
| RevisionIndex | 0-based revision (0 is the original file); use GetDocumentRevisionCount for the chain length |
|---|---|
| OutputFileName | Target path for the extracted revision |
Return values
1 on success, 0 when the document was not loaded from a file or the revision does not exist
Remarks
The output is the raw byte prefix of the source ending at the revision boundary, so signatures of that revision verify unchanged