Auto Number

<< Click to Display Table of Contents >>

Navigation:  Appendix > Macros >

Auto Number


 

welcome.icon.pdftools Auto Number

 


 

The Auto Number macro inserts a numerical value as the name for output files.

 

The syntax for this macro is %[AutoNumber] and two sections of parameters are available.

 

The first section determines the format of page numbers:

 

'r' specifies the use of lower-case roman numerals.

'R' specifies the use of upper-case roman numerals.

'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.

'<integer> specifies the minimum number of digits displayed for page numbers. This value can be any positive integer from 1 to 12 - for example %[Autonumber:4] starts the numbering as "0001, 0002, 0003...".

 

The second section determines the offset for the start value. Note that the default offset is zero and the default starting value is 1. This means that if, for example, you want to start from 5, then you must specify '4'.

 

Please note that a semicolon must be used to delimit the sections of parameters. If the second section is not used then the semicolon can be omitted. However, if the first section is not used and the second section is used then it is necessary to use the semicolon.

 

The syntax for this macro when both parameters are used is %[Autonumber:<Parameter 1>;<Parameter 2>]

 

The syntax for this macro when only the second parameter is used is %[Autonumber:;<Parameter 2>]. For example, '%[AutoNumber:;3]' sets the start value as four.

 

Note that the starting value for output files depends on the files contained in the destination folder. If the folder is empty, or does not contain files with names that match the output parameters detailed above, then the default values are used. If the folder does contain files that match the output parameters detailed above, then the starting value will be the lowest possible integer.

 

Example

 

The Filename text box of Save Images action in the Extract Images from PDF tool is set to %[AutoNumber]:

 

autonumber.macro.enabled

Figure 1. Extract Images from PDF Tool Actions Sequence, Save Images Action, %[AutoNumber] Macro Added as Filename

 

Therefore the output is autonumbered when the tool is used:

 

autonumber.output

Figure 2. Output Folder