Skip to main content
August 28, 2017
Question

Print specific pages multiple times

  • August 28, 2017
  • 1 reply
  • 401 views

Hi,

I need a script to print out page 1-6 three times and page 7 one time. I have made a button with the following script:

this.print(true, 0, 6);

this.print(true, 0, 5);

this.print(true, 0, 5);

How can I make this into one code to avoid the print window (ctrl + P) to appear three times?

Jenny

This topic has been closed for replies.

1 reply

try67
Community Expert
Community Expert
August 28, 2017

Use this code:

var pp = this.getPrintParams();

pp.printRange = [[0,5], [0,5], [0,5], [6,6]];

this.print(pp);

August 28, 2017

Thank you so much once again!

I have one more question left (at least for now!!)

The user should preferably not see page 4 and 6, but I need them to be printed out. The users will print double sided, so I have added some blank pages to avoid mixing different papers. Do you know a code for hiding these blank pages?

try67
Community Expert
Community Expert
August 28, 2017

Assuming the file is going to be used in the free Reader that's quite complicated to implement.

I would just add a non-printable, read-only text field on those pages saying they are intentionally left blank for printing purposes, or something like that.