CommitStructTreeTransaction

Tagged PDF, structure repair

Description

Normalises, validates, and optionally reconciles the document ParentTree, ParentTreeNextKey, and IDTree after transactional structure edits

Syntax

Delphi

Function TPDFlib.CommitStructTreeTransaction(ReconcileParentTree: Integer= 1): Integer;

Parameters

ReconcileParentTree0 to normalise only, 1 for strict ParentTree reconciliation (default), or 2 for repair-mode ParentTree reconciliation

Return values

1 when all edits commit cleanly, or 0 when validation or strict reconciliation fails (in which case the pre-transaction document state is restored automatically)

Remarks

Inspect GetLastStructTreeDiagnostics when 0 is returned for JSON details such as conflicting_mcid_owner or duplicate_id