Macros are used throughout PDF-Tools. 'Macro' is an abbreviation of 'macroinstruction' - a term in computer science for a rule that specifies how input characters should be entered to create corresponding output. This means that components of the output process can be simplified during the input process, which makes the work involved less intensive and more dynamic. Multiple macros can be used simultaneously as desired. The format for macros is:
%[<Macro Name>] or, when it is customizable: %[<Macro Name>:<Parameter>]. The <Parameter> step is optional.
For example, the Page Number macro can be used to specify the page numbering format. The syntax for the Page Number macro is %[Page:<Parameter>] and the following parameters are available:
•'r' specifies the use of lower-case roman numerals - %[Page:r].
•'R' specifies the use of upper-case roman numerals - %[Page:R].
•'L' specifies page labels as the page numbering format in cases where page labels have been specified. If page labels have not been specified then standard page numbers are used - %[Page:L].
•'<integer> specifies the minimum number of digits used. This value can be any positive integer from 1 to 12 - for example %[Page:4] starts the page numbering as "0001, 0002, 0003...".
Macros are available when determining the filename of output documents, and also when the macro icon is displayed:
Figure 1. Add Watermark Dialog Box, Macro Icon Highlighted
Click the macro icon to view a list of available options, then click macros to add them to the text box. All available macros are detailed below: