THPDFContentSemanticStatistics Record
Collects normalised operation counts, state depth and canonical byte size computed for one content stream
Declaration
THPDFContentSemanticStatistics= record
TokenCount: Integer;
OperationCount: Integer;
StateOperationCount: Integer;
RedundantStateOperationCount: Integer;
NormalizedEventCount: Integer;
MaximumGraphicsStateDepth: Integer;
CanonicalBytes: Int64;
ErrorOffset: Integer;
LimitExceeded: boolean;
Valid: boolean;
Diagnostic: AnsiString;
end;
Unit
HPDFContentStream
Fields
| Field | Purpose |
|---|---|
TokenCount | Tokens parsed from the stream |
OperationCount | Operators found in the stream |
StateOperationCount | Graphics state operators tracked during normalisation |
RedundantStateOperationCount | State operations that did not change the canonical state |
NormalizedEventCount | Events in the canonical event sequence |
MaximumGraphicsStateDepth | Deepest graphics state nesting reached whilst interpreting |
CanonicalBytes | Size of the canonical byte form produced for comparison |
ErrorOffset | Byte offset where parsing or evaluation failed |
LimitExceeded | True when the operation or canonical byte limit brought the pass to a halt |
Valid | False when parsing or evaluation failed |
Diagnostic | Failure description when Valid is False |
Usage notes
- Filled by
HPDFNormalizeContentStreamGraphicsStatealongside the canonical byte output RedundantStateOperationCountquantifies the state noise that normalisation strips out before streams are compared- Compare two streams through
HPDFCompareContentStreamsSemanticrather than comparing these records one field at a time