ExtractDocumentRevisionA

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

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

Writes an earlier revision of the document to a new file

Syntax

Delphi

Function DLExtractDocumentRevisionA(InstanceID: Integer; RevisionIndex: Integer; OutputFileName: PAnsiChar): Integer;

DLL

int DLExtractDocumentRevisionA(int InstanceID, int RevisionIndex, const char* OutputFileName);

Parameters

RevisionIndex0-based revision (0 is the original file); use GetDocumentRevisionCount for the chain length
OutputFileNameTarget 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

See also

GetDocumentRevisionEnd, SaveChanges