OnCalcVariable

Page layout

Description

Resolves custom <%name%> placeholders encountered by ExpandVariableTokens, ExpandStampTokens, stamp text and header or footer helpers

The handler receives the placeholder name without delimiters and the one-based page number; assign the replacement to VarValue, or leave it empty to remove the placeholder

Syntax

Delphi

Property OnCalcVariable: TPDFlibCalcVariableEvent Read FOnCalcVariable Write FOnCalcVariable;
TPDFlibCalcVariableEvent = Procedure(Sender: TObject; Const VarName: WideString; Var VarValue: WideString; PageNo: Integer) Of Object;