PDFiumPas Docs

RemoveContentEventParam method

Component: TPdf · Unit: PDFium

Added in internal v3.406.0, updated 2026-11-10

Syntax

procedure RemoveContentEventParam(Index: Integer; const Key: WString); overload;
procedure RemoveContentEventParam(const ContainerPath: TPdfCharacterSourcePath;
  Index: Integer; const Key: WString); overload;

Removes an existing parameter from one source declaration or marked point, detaching this declaration from other named-resource users

Missing keys and MCID removal are rejected before mutation; the UTF-8 key must be nonempty, contain no null and fit within 255 bytes

Removing the final key retains an explicit empty parameter dictionary and the BDC/DP operator form

ActualText and coordinate tables

Adding, replacing or removing ActualText on a represented scope first plans invalidation of PdfParagraphClusterMap tables on the surviving declaration, affected shared members and affected Form descendants

The plan conservatively clears descendant tables even when an inner paragraph has its own ActualText; it retains the ActualText strings, paint content, unrelated invocations and unselected nested branches

First-glyph PCM1 columns stay within their sibling container; horizontal multi-glyph maps are distinguished when native raw glyph counts are available; the scan shares a 1048576-unit work budget and total Form depth 64

Invalidating the changed declaration's own table is required even when the declaration survives or gains its first ActualText parameter; the complete metadata edit and invalidation join one transaction

MCID changes remain rejected; nonstructural tagged-page metadata can retain an existing ParentTree/MCID binding without changing the structure tree

Transaction and ownership

Available in internal v3.406.0 through the optional native source-event extension

Call only inside BeginPageObjectEditTransaction(False, True); an ordinary or inactive batch raises EPdfError before mutation

An empty path selects the current page; a nonempty path selects one Form invocation using zero-based page-object and Form-child indexes, with at most 64 path entries

Event indexes refer to the current parsed container; use the opener of a declaration or a marked point, not its closing EMC

Internal v3.409.0 also edits scopes with represented paint members through the optional FPDFPage_SetContentEventMemberValue or FPDFFormObj_SetContentEventMemberValue procedure, retaining exact shared mark identity and member lists

Older runtimes keep their source-only profile: the wrapper falls back to the original setter, which rejects represented declarations whilst still supporting empty scopes and marked points

Successful requests join the deferred batch and commit generates once, including when only a zero-paint Form changed; independent shared invocations retain their original streams and resources

Actual changes expire public parser coordinates; current logical event indexes remain usable for metadata edits; after a structural splice or object removal, obtain fresh indexes from TryGetContentEventForEdit

Invalid paths, encodings, limits or unavailable optional procedures raise EPdfError without applying that request; the active transaction remains available for explicit rollback

If post-edit paragraph invalidation or a later preserving commit fails, it closes the batch, restores the entire captured snapshot including earlier edits, and raises EPdfError without ordinary-generation fallback

The complete source/edit combination must fit the preserving writer profile; dirty Forms carrying StructParents, or in a document with StructTreeRoot, remain rejected until reciprocal structure updates are supported

Native runtimes without the extension remain usable for their existing supported operations

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

See also

TryGetContentEvent, ContentEventCount, BeginPageObjectEditTransaction, SetContentEventTag, SetContentEventParam