PDFium Delphi Component Docs

SetPageObjectMarkParam method

Component: TPdf  ·  Unit: PDFium

Syntax

procedure SetPageObjectMarkParam(Index, MarkIndex: Integer; const Param: TPdfContentMarkParam);

Description

Adds or replaces one property on an existing marked-content entry through its native PDFium mark handle

The operation preserves the mark name, mark order, native handle, and every unrelated property

Index and MarkIndex are zero based and refer to the current page

Parameter values

Set Param.Key and select pmpInt, pmpFloat, pmpString, or pmpBlob in Param.Kind

Only the matching value field (IntValue, FloatValue, StringValue, or BlobValue) is read

Keys are PDF names and must be non-empty byte-compatible strings, while blob values must contain at least one byte

A key already present is replaced even when its value kind changes

Removing a parameter

procedure RemovePageObjectMarkParam(Index, MarkIndex: Integer; const Key: WString);

Removes only the named property and preserves the marked-content entry

A missing key raises EPdfError because no mutation occurred

Adding or removing a mark

AddPageObjectMark creates a new mark with an initial typed property array and returns its index

RemovePageObjectMark removes the complete marked-content entry

A failed initial parameter validation rolls back the newly created mark

Persistence and performance

Each successful mutation invalidates the text-page cache and regenerates current page content once so subsequent saves contain the updated BDC property list

PageObjectMarks can be read immediately to obtain a fresh snapshot

Non-integral PDF number values are returned as pmpFloat

See Also

Advanced page content APIs, GenerateTaggedLayout, StructureElements