procedure BeginPageObjectEditTransaction(AllowSignedDocument: Boolean = False; PreserveSourceEvents: Boolean = False);
BeginPageObjectEditTransaction captures a bounded, reproducible snapshot of the active document and enters the transaction state in which page-object edits are tracked and can be committed or rolled back as a unit
By default the call refuses a document that carries signatures; pass AllowSignedDocument = True to open the transaction anyway when the caller accepts responsibility for invalidating existing signatures
PageObjectEditTransactionStatus while the transaction is openCommitPageObjectEditTransaction to apply the journalled edits or RollbackPageObjectEditTransaction to restore the snapshotWrap a group of object edits so they can be undone as one unit
Pdf1.BeginPageObjectEditTransaction;
try
Pdf1.SetTextObjectFontSize(3, 14);
Pdf1.CommitPageObjectEditTransaction;
except
if Pdf1.PageObjectEditTransactionStatus.Active then Pdf1.RollbackPageObjectEditTransaction;
raise;
end;
Internal v3.412.0 adds checked Form ownership review at commit when both optional native Form procedures are available; begin still captures the original identity-preserving snapshot, and a successful begin does not certify that a later tagged Form edit can be committed
Internal v3.413.0 supplies both optional Form procedures in all four bundled Windows modules; the exact Win64 ordinary module retains its original checked-adapter qualification, while other variants have build/static evidence only and older runtimes retain their previous tagged Form rejection profile
Internal v3.409.0 supports represented event tag/parameter editors through optional member-value procedures, planning recursive paragraph-map invalidation for ActualText changes and restoring the complete transaction after post-edit failure
Internal v3.408.0 plans recursive paragraph-map invalidation when removing ActualText around Form members; preflight rejection retains the unmodified active transaction, while a post-splice metadata failure restores and closes the entire transaction
Internal v3.407.0 adds logical edit views and transaction-bound cursors for InsertContentEvent and RemoveContentEvent; use fresh cursors after structural mutations, and retain original parser coordinates only as an expiring source snapshot
Internal v3.406.0 permits source-only tag and typed parameter edits through SetContentEventTag, SetContentEventParam and RemoveContentEventParam inside this preserving batch, including zero-paint nested Forms
Internal v3.404.0 adds the optional second argument PreserveSourceEvents, default False so existing callers retain ordinary generation
True requires all five optional native content-event procedures before opening the transaction; source/operator compatibility is checked at commit, not certified by a successful begin
Supported text, path and named-image edits preserve empty declarations, marked points and scopes spanning empty content streams; internal v3.405.0 also supports Form invocation geometry and private dirty untagged Form subtrees
Unsupported source operations, changed membership or changed inherited Form graphics raise EPdfError and restore the captured snapshot without an ordinary-generation fallback
Internal anchors support repeated successful transactions, while public parsed-source coordinates stay expired until reload
See TryGetContentEvent for the supported writer profile and ContentEventCount for capture limits
Pdf1.BeginPageObjectEditTransaction(False, True);
try
Pdf1.SetText(0, 'Revised');
Pdf1.CommitPageObjectEditTransaction;
except
if Pdf1.PageObjectEditTransactionStatus.Active then
Pdf1.RollbackPageObjectEditTransaction;
raise;
end;
Internal v3.409.1 preserves explicit MCR/Stm links through page-stream regeneration, including scalar or array Contents, continued scopes across empty stream slots, indirect MCR dictionaries and inherited Pg context
Structural back-references alone do not force content-stream cloning; genuine painting shared by another page is isolated, and only the selected page's MCR declarations are retargeted
ParentTree slots, MCIDs, StmOwn and opaque declaration values remain intact; shared MCR templates and K arrays are detached only for the affected owner
The relevant binding plan rejects unresolved page/stream references, conflicting ParentTree ownership, duplicate physical declarations, cyclic paths or exceeded depth/work bounds before writes; this is a preservation check, not a full document-conformance audit
Tagged Form cloning, Form-scoped role/MCID reassignment and broader source/graphics profiles remain separate requirements
Internal v3.410.0 adds the separate RebindContentEvent method for a reviewed page-scoped MCID owner or number change; it retains the target element role, requires a fresh page cursor and restores the whole batch after post-acceptance failure