Skip to main content
Participant
September 6, 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.?

  • September 6, 2016
  • 返信数 1.
  • 524 ビュー

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

このトピックへの返信は締め切られました。
解決に役立った回答 try67

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 = "";

返信数 1

try67
Community Expert
try67Community Expert解決!
Community Expert
September 6, 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 = "";