TPdfReadableContentOptions = record ExcludeArtifacts: Boolean; IncludeFormXObjects: Boolean; IncludeSharedFormXObjects: Boolean; IncludeTaggedFormXObjects: Boolean; IncludeSemanticReplacements: Boolean; MarginLeft, MarginTop, MarginRight, MarginBottom: Double; HeuristicOrder: TPdfReadableHeuristicOrder; ColumnGap: Double; RightToLeft: Boolean; class function Default: TPdfReadableContentOptions; static; end;
ReadableContentOptions defaults to no filtering, preserving existing reader output; set a complete record on TPdf before reading
ExcludeArtifacts removes top-level objects carrying an Artifact content mark and tagged elements under Artifact structure ancestors
MarginLeft, MarginTop, MarginRight and MarginBottom are nonnegative PDF-point distances in the unrotated CropBox axes, falling back to MediaBox; the object's bounding-box center determines inclusion and boundary centers remain included
Margins accept finite values from 0 through 1000000 points; invalid settings preserve the existing policy and cached content
Unknown or nonfinite object geometry is retained rather than guessed; margins that consume the content area produce an empty readable page
Mixed MCID text without semantic overrides keeps its retained object text and rectangles; an ActualText, Alt or expansion owner containing filtered descendants is omitted as a whole when its semantic replacement cannot be separated safely
When all tagged readable content is filtered, the result remains an empty structured result instead of reintroducing content through heuristic fallback
Changing the options clears readable snapshots; TPdfView and document/session reading-unit queries share the owning document's policy
Filtering changes reader output only: it does not remove PDF objects, change page/focus/selection or rewrite saved content; native save/reopen retains the original text and Artifact marks
The default object filter uses the top-level readable object/MCID map; IncludeFormXObjects separately enables bounded unique untagged Form expansion with inherited Artifact marks and transformed margins
Set TPdf.ReadableContentOptions.HeuristicOrder to rhoColumns to apply geometry-based ordering only to heuristic reader output; rhoNative remains the default and tagged logical order is unchanged
ColumnGap defaults to 18 points and accepts finite values from 1 through 1000000; RightToLeft chooses right-to-left column progression and horizontal tie order
The heuristic identifies separated columns with at least two objects on each side and overlapping vertical extents, recursively arranging each side from top to bottom
Objects crossing a candidate gutter form spanning flow bands: content above each band is read by column, followed by the band and then the columns below it; this handles full-width headings, footers and intermediate captions
Ordering uses displayed bounding boxes at 1/64 point resolution, including the page's intrinsic Rotate; it does not rewrite text direction, font orientation or source rectangles
ReadableContent.HeuristicOrderApplied reports successful geometric ordering and DetectedColumns reports the maximum columns in a flow band; tagged/native results and failed ordering report False and zero
Unsupported geometry, more than 2048 readable objects, recursion beyond 32 levels or more than 8388608 work visits retain the entire original native order without partial sorting
Failed geometric ordering bypasses retention, allowing a transient native geometry failure to recover on the next read
Exact source text, MCIDs and rectangles remain attached to their original fragments; reading units and bound viewers share the ordered snapshots, and native save/reopen preserves the original PDF content
This is a deterministic horizontal-layout heuristic, not general layout recognition for arbitrary overlapping, vertical or mixed-direction text; ambiguous layouts remain a caller policy decision
Opt-in IncludeFormXObjects expands unique untagged nested Forms with page-space geometry and native selection/speech ownership; NativeObjectPath and FormSourceIdentity are independently copied into fragments, reading units and continuation source parts
NestedFormsComplete=False and NestedFormsError report disabled shared/tagged, clipped, unsupported or over-budget paths; unrelated top-level output and supported siblings remain available
Set IncludeSharedFormXObjects together with IncludeFormXObjects to read each untagged shared invocation separately, including identical overlapping text; source identities bind the live invocation and full object path
Separate opt-in IncludeTaggedFormXObjects reads the bounded tagged Form profile in certified structure order, with explicit page/Form MCID namespaces and ParentTree ownership; same-page shared invocations also require IncludeSharedFormXObjects, and certified fragments carry independent live paths/identities and StructElementIndex=-1