HPDFVisitContentStreamOperators
Visits a decoded content stream and returns validated transformed bytes
Declaration
function HPDFVisitContentStreamOperators(const Bytes: TBytes;
Sender: TObject; const Visitor: IHPDFContentOperatorVisitor;
OnOperator: THPDFContentOperatorEvent;
const Options: THPDFContentOperatorVisitOptions;
CancellationToken: THPDFCancellationToken; out Output: TBytes;
out Statistics: THPDFContentOperatorVisitStatistics): boolean;
Parameters
Bytescontains decoded PDF content-stream bytesSenderis forwarded to the Delphi event callbackVisitorandOnOperatorare optional synchronous handlersOptionssupplies all parser and replacement budgetsCancellationTokenenables cooperative cancellationOutputreceives byte-identical input when no edits are requestedStatisticsreceives status, counts, state depths, byte totals, and diagnostics
Return value
True for completed or intentionally stopped traversal with valid output, otherwise False
Usage notes
- The interface visitor runs before the event callback
- Replacement output is reparsed before success when
ValidateOutput=True - Rejection and failure clear
Outputso callers cannot publish partial edits