PDFiumPas Docs

ReadPageContentSemanticFrame

Unit: PDFium
function ReadPageContentSemanticFrame(PageNumber: Integer): TPdfContentSemanticFrame;

Available since v3.289.0, updated 2026-11-02

Read the selected one-based page's serialized marked-content declarations and native object boundaries as a caller-owned, handle-free TPdfContentSemanticFrame. The method preserves the active page and readable-content options and inspects native count and type correspondence under the render lock

Data contains the decoded top-level page content sequence. Zero-based byte ranges use inclusive FirstByte and exclusive AfterByte. Objects follows actual top-level native order and excludes provably nonpainting text/path operations. Marks retains BMC/BDC/EMC and MP/DP occurrences, exact object-boundary positions and begin/end pairing, including declarations with no native object

Named property dictionaries are resolved into direct MCID, Lang, ActualText, Alt and E values. Properties retains the distinction between BMC/MP without a dictionary and BDC/DP with a dictionary. Other property keys, unresolved resources and native/source inventory mismatches reject this bounded profile

The source snapshot is limited to 64 MiB, decoded streams to 8 MiB each, pages to 4096 and each materialized source object to 64 MiB. Per-page native objects are limited to 4096, retained mark operations to 65536 and resolved frame property text to 4 MiB; existing decoded/work, semantic string and graphics-state limits also apply

Since v3.292.0, the frame and normal Form/semantic reader separate the 65536 active-object budget from an exclusive sparse object-number bound of 1048576, with a dynamically bounded lookup index. This admits sparse identities created by repeated transactions without raising the active-object count limit

Frame ranges belong only to Data and are not persistent object identities. This read result does not authorize an edit or certify a stale snapshot. ExecuteStyledPdfMarkedText captures fresh frames within its source-hash and transaction checks, restores declaration coverage and reopens the result before publishing it

Only the requested page's top-level declarations are returned. Since v3.290.0, Form invocations occupy one top-level native boundary without recursively interpreting their internal marks or private property keys. Existing Form streams remain separate resources; this method does not perform shared-instance editing or internal structure normalization