THPDFContentOperatorEventData Record
Delivers one content-stream operator visit to a listener with position, state, operand view, and the action to apply
Declaration
THPDFContentOperatorEventData= record
Phase: THPDFContentOperatorVisitPhase;
OperationIndex: Integer;
NodeIndex: Integer;
OperatorName: AnsiString;
OperandCount: Integer;
StartOfs: Integer;
EndOfs: Integer;
State: THPDFContentOperatorState;
View: THPDFContentOperatorView;
Action: THPDFContentOperatorAction;
Replacement: SysUtils.TBytes;
end;
Unit
HPDFContentStream
Fields
| Field | Purpose |
|---|---|
Phase | Visit stage: covpBeginStream, covpOperator, or covpEndStream |
OperationIndex | Zero-based ordinal of the operator in the stream |
NodeIndex | Index of the operation node in the syntax tree |
OperatorName | Operator text, such as Tj or cm |
OperandCount | Number of operands owned by the operation node |
StartOfs | Byte offset where the operation starts in the source stream |
EndOfs | Byte offset just past the operation |
State | Graphics state, text object, marked content, and compatibility nesting depths at the visit point |
View | THPDFContentOperatorView giving read access to operation and operand bytes |
Action | Listener decision: coaKeep, coaDelete, coaReplace, coaStop, or coaReject |
Replacement | New bytes substituted for the operation when Action is coaReplace |
Usage notes
- Received by
IHPDFContentOperatorVisitor.VisitContentOperatorand byTHPDFContentOperatorEventhandlers - Set
ActiontocoaDeleteorcoaReplace(withReplacementbytes) to rewrite the stream,coaStopto end the pass early, orcoaRejectto abort with an error status - The
Viewis valid only during the callback; copy any operand bytes out before returning