THPDFContentOperatorState Record
Tracks the nesting depths the content-operator walker maintains while visiting a stream
Declaration
THPDFContentOperatorState= record
GraphicsStateDepth: Integer;
TextObjectDepth: Integer;
MarkedContentDepth: Integer;
CompatibilityDepth: Integer;
end;
Unit
HPDFContentStream
Fields
| Field | Purpose |
|---|---|
GraphicsStateDepth | Count of open q operators not yet closed by Q |
TextObjectDepth | Count of open BT text objects not yet closed by ET |
MarkedContentDepth | Count of open BMC/BDC marked-content sequences not yet closed by EMC |
CompatibilityDepth | Count of open BX compatibility sections not yet closed by EX |
Usage notes
- The walker updates the record as paired operators stream past and delivers the current snapshot on every visitor event
- Visitors can read the depths to decide whether an operator sits inside a text object or a marked-content sequence before editing it
- The matching
THPDFContentOperatorVisitStatisticsfields record the maximum depth each counter reached, useful for spotting unbalanced streams