TPDFContentFilterResult
Data types, content stream editing
Description
TPDFContentFilterResult is the value a TPDFContentFilterCallback returns to tell the chain whether to keep going. cfrContinue accepts the layer, and cfrStop abandons the remaining filters for it.
The chain's Apply method (TPDFContentFilterChain) stops at the first cfrStop and returns False. ApplyContentFilterChainExt then skips the write-back for that layer and moves on to the next one, so layers already written remain modified.
Syntax
Delphi
TPDFContentFilterResult = (cfrContinue, cfrStop);Values
| cfrContinue | Ordinal 0: keep the mutations made so far and run the next filter in the chain |
|---|---|
| cfrStop | Abandon the chain for this layer; the layer is not written back and the remaining layers continue to be processed |
Remarks
There is no separate modified or unmodified state: a filter signals edits only by mutating the program it was given, and the return value controls the chain alone.
cfrStop is scoped to one layer: the remaining layers are still parsed and filtered, so a run-wide abort has to be arranged by the callback itself, for example through state kept behind FilterData.
See also
TPDFContentFilterCallback, TPDFContentFilterChain, ApplyContentFilterChain, ApplyContentFilterChainExt