SetPageElementMarkedContentTextProperty

Content stream editing, Tagged PDF

Description

Sets a Unicode text-string property on one exact marked-content frame captured by page-element enumeration

Syntax

Delphi

Function TPDFlib.SetPageElementMarkedContentTextProperty(ElementID, MarkedContentIndex: Integer; Const PropertyName, PropertyValue: WideString): Integer;

Parameters

ElementIDOpaque page-element handle
MarkedContentIndex1-based frame index in outer-to-inner order
PropertyNamePDF property name with or without a leading slash, such as ActualText, Alt or Lang
PropertyValueUnicode text encoded as a PDF text string

Return values

1The property was set and all page-element snapshot handles were invalidated
0The handle, frame or property name is invalid, the snapshot is stale or a named property resource cannot be resolved

Remarks

A BMC instruction is promoted to BDC when the first property is added

Named property lists are copied to a page-local private resource before editing so other occurrences and inherited-resource users remain unchanged

On failure, inspect LastErrorCode: 529 means invalid input, 530 means stale content and 531 means an unresolved named property resource