EnumeratePageElements
Content stream editing
Description
Enumerates every non-empty text-showing instruction, concrete image placement, and painted path on one page, then retains an editable snapshot for the scalar accessors and mutation methods. Each element receives an opaque ID tied to its exact content layer and instruction range. A later enumeration or successful mutation invalidates all earlier IDs
Syntax
Delphi
Function TPDFlib.EnumeratePageElements(Page: Integer): Integer;ActiveX
Function PDFlib::EnumeratePageElements(Page As Long) As LongDLL
int DLEnumeratePageElements(int InstanceID, int Page);Parameters
| Page | One-based page number |
|---|
Return values
The number of editable elements, or 0 when the page is invalid or contains no supported paint objects
Remarks
Use one-based indexes with the GetEnumeratedPageElement* accessors, then pass the returned opaque ID to DeletePageElement or TransformPageElement
The same opaque ID can enumerate the element's effective clipping components, transformed path segments, fill rules and combined bounds with the GetPageElementClipPath* and GetPageElementEffectiveClip* APIs
GetPageElementMarkedContent* queries expose the active outer-to-inner tag stack, validated MCID values and direct or resource-backed property dictionaries without reparsing the page