Apply

Content streams

Description

Runs every registered filter, in registration order, on one parsed content layer. Each callback receives Program_, LayerName and the FilterData pointer registered with it, and may insert, delete or modify instructions in the program directly before the program is serialised back.

When a callback returns cfrStop, the pass short-circuits: Apply returns False immediately and the remaining filters are not invoked.

Syntax

Delphi

Function TPDFContentFilterChain.Apply(Program_: TPDFContentProgram; Const LayerName: AnsiString): Boolean;

Parameters

Program_Parsed instruction list of one content layer; filters mutate it in place
LayerNameName of the content layer, passed through to every callback

Return values

TrueEvery registered filter ran and returned cfrContinue
FalseA filter returned cfrStop; the remaining filters were skipped

See also

TPDFContentFilterChain, NewContentFilterChain, ApplyContentFilterChain, ApplyContentFilterChainExt, TPDFContentProgram