Skip to main content
Participant
September 6, 2016
Resuelto

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

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

Este tema ha sido cerrado para respuestas.
try67
try67Respuesta
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 = "";

1 respuesta

try67
Community Expert
try67Community ExpertRespuesta
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 = "";

Traducir