With "-setTextWatermark" (text watermark) and "-writeText" (text addition), you can use "macro text" to replace execution date of the Command-line application, file names, page numbers, etc.
For details on associated command, see:
|
Macro Text |
Content |
|
|
#DATE() |
Execution date and time. Sets the following date characters between "#DATE(" and ")". Other macro text between this is invalid. All characters other than date characters are output as is. |
|
|
[date character] |
||
|
YYYY or yyyy |
A.D. |
|
|
MM or mm |
Month (2-digit display) |
|
|
M or m |
Month |
|
|
DD or dd |
Day (2-digit display) |
|
|
D or d |
Day |
|
|
#PAGE_NUM |
Page number |
|
|
#TOTAL_PAGES |
Total number of pages |
|
|
#FILE_NAME |
File name |
|
|
#FULL_PATH |
Full pathname of the file |
|
|
#TITLE |
Document information: Title |
|
|
#SUB_TITLE |
Document information: Subtitle |
|
|
#AUTHOR |
Document information: Author |
|
In case of May 31, 2021,
Insert the text "What day is it today? [#Date]" as a text watermark on all pages of test.pdf and output it as out.pdf.
The [#date] part of the text is a macro text, and [Year/Month/Day] at the time of execution is inserted.
AHPDFToolCmd80.exe -setTextWatermark -text "What day is it today? #DATE(YYYY/M/D)" -colorText 1 0 0 -diagonal -font -name Meiryo -size 52 -d C:\test\test.pdf -o C:\sav\out.pdf
AHPDFToolCmd80 -setTextWatermark -text "What day is it today? #DATE(YYYY/M/D)" -colorText 1 0 0 -diagonal -font -name ipa-gothic -size 52 -d /home/antenna/test/test.pdf -o /home/antenna/sav/out.pdf