Skip to main content
Aug 28, 2017 5:10 PM UTC
Question

Print specific pages multiple times

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 is closed to new replies. Start a new post to keep the conversation going.

4 replies

try67
Community Expert
Community Expert
Aug 28, 2017 6:47 PM UTC

Use this code:

var pp = this.getPrintParams();

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

this.print(pp);

Translate
Aug 28, 2017 7:08 PM UTC

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?

Translate
try67
Community Expert
Community Expert
Aug 28, 2017 7:23 PM UTC

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.

Translate