Skip to main content
miguelp22027494
Participant
Feb 16, 2017 3:01 PM UTC
Question

Page Counter

Hi, how can I create an action, count the number of times a document is printed, and show in the document.

For example, I want to print a document 10 times and the document is of 1 page, So each page must exit with the numbering 1/10, 2/10, 3/10 ...

Thank you

This topic is closed to new replies. Start a new post to keep the conversation going.

8 replies

Joel Geraci
Community Expert
Community Expert
Feb 16, 2017 4:15 PM UTC

You can't reliably do this. Even with a script, the user can easily change the number of copies to print in the print dialog and Acrobat never gets notified.

Translate
try67
Community Expert
Community Expert
Feb 16, 2017 3:07 PM UTC

You can do it with a simple loop. Let's say the counter is a text field called PrintCounter. You can use this code to do it:

var max = 10;

for (var i=1; i<=max; i++) {

    this.getField("PrintCounter").value = i + "/" + max;

    this.print();

}

Translate
miguelp22027494
Participant
Feb 17, 2017 11:08 AM UTC

Ok. Now I have this script and I want to add this counter so that I can see the number printed on the document. How can i include it.

I want to delete the date and time and I only have "Page 1/X".

Thank You.

Translate
try67
Community Expert
Community Expert
Feb 17, 2017 11:22 AM UTC

You just need to create a field called "PrintCounter". If you want you can then duplicate it to all the pages in the file.

You don't need to use a script for it, though.

Translate