Adding amount of pages into a dynamic stamp
Copy link to clipboard
Copied
Hi guys,
complete newbie here, trying to create a dynamic stamp that will count and appropriately add the amount of pages within my PDF.
I have created a dynamic stamp with a text box im just unsure what to do next, any help would be super appreciated 🙂
TIA
Copy link to clipboard
Copied
To get the total number of pages in a document, use the doc property numPages.
Copy link to clipboard
Copied
thats not what i'm looking to do.
I need the java script to input within a text box on this dynamic stamp to auto-fill the number of pages on the open pdf.
Copy link to clipboard
Copied
As the custom calculation script of that field enter:
if (event.source) event.value = event.source.source.numPages;
Copy link to clipboard
Copied
 for some reason it wont let me paste anything?
as I said I am a complete novice at this I apoligise and thank you for the help in advance.
Copy link to clipboard
Copied
Click on the "Edit" button.
Use the Acrobat JavaScript Reference early and often
Copy link to clipboard
Copied
managed to paste it in but the text box just goes translecent and nothing happens,
its fine im giving up. :@
Copy link to clipboard
Copied
When you apply the stamp it will be populated. If it doesn't, please share the stamp file here.
Copy link to clipboard
Copied
Here's a working example...

