Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

How can I print a number of copies of a document (Y) and add custom text at the bottom "Page X of Y" where X is the number of the copy printed 1, 2,...7.. etc.?

New Here ,
Sep 06, 2016 Sep 06, 2016

How can I print  a number of copies of a document (Y) and add custom text at the bottom "Page X of Y" where X is the number of the copy printed 1, 2,...7.. etc.?

TOPICS
Acrobat SDK and JavaScript
474
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Sep 06, 2016 Sep 06, 2016

You would need to print the file using a loop. Let's say you have a field called "Counter" where you want to place this text. The basic code to do it would be:

var y = 5;

for (var x=1; x<=y; x++) {

    this.getField("Counter").value = "Page " + x + " of " + y;

    this.print();

}

this.getField("Counter").value = "";

Translate
Community Expert ,
Sep 06, 2016 Sep 06, 2016
LATEST

You would need to print the file using a loop. Let's say you have a field called "Counter" where you want to place this text. The basic code to do it would be:

var y = 5;

for (var x=1; x<=y; x++) {

    this.getField("Counter").value = "Page " + x + " of " + y;

    this.print();

}

this.getField("Counter").value = "";

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines