ExpandVariableTokens
Page layout
Description
Expands case-insensitive <%name%> placeholders for a page
The built-in names are PageNo, TotalPages, ShortDate, LongDate, ShortTime and LongTime; other names are passed to OnCalcVariable, or preserved verbatim when no handler is assigned
ExpandStampTokens calls this method automatically after expanding the classic ampersand tokens
Syntax
Delphi
Function TPDFlib.ExpandVariableTokens(Const Text: WideString; PageNo, TotalPages: Integer): WideString;Parameters
| Text | Text containing zero or more variable placeholders |
|---|---|
| PageNo | One-based current page number |
| TotalPages | Total page count used by the built-in placeholder |
Return values
Text with all recognised placeholders expanded