StartEditJournal

Document editing, Recovery

Description

Starts an edit journal for the selected document and captures its current state as the undo baseline

Transactions keep at most MaxUndoSteps prior states in memory. A non-empty FileName also creates a crash-recovery journal whose state and cursor records are appended and flushed independently

Recovery files contain serialised PDF snapshots but never store a document password. Encrypted snapshots remain encrypted and require the password when recovered

Syntax

Delphi

Function TPDFlib.StartEditJournal(Const FileName: WideString= ''; MaxUndoSteps: Integer= 32): Integer;

ActiveX

Function PDFlib::StartEditJournal(FileName As String, MaxUndoSteps As Long) As Long

DLL

int DLStartEditJournal(int InstanceID, const wchar_t *FileName, int MaxUndoSteps);
int DLStartEditJournalA(int InstanceID, const char *FileName, int MaxUndoSteps);

Parameters

FileNameRecovery journal path, or an empty value for memory-only history
MaxUndoStepsNumber of committed transitions retained, clamped to the supported range 1 through 1000

Return values

1The journal started
0The selected document or journal state is invalid, or the recovery file could not be created