Copy link to clipboard
Copied
I am trying to create a custom print button on a PDF form that will print pages 2-4, SKIP page 5, and continue printing page 6-7. Is this possible? I am not very familiar with JavaScript and have tried looking at other post on this topic but I can not figure out how to not print page 5.
Any help would be apprecitated.
Copy link to clipboard
Copied
You can add this code to button: (keep in mind page 1 is 0, page 2 is 1, page 3 is 2...etc)
var x = this.getPrintParams();
x.printRange = [[1,3], [5,6]];
this.print(x);
Copy link to clipboard
Copied
Yes, this can be done using a script, like this:
var pp = this.getPrintParms();
pp.printRange = [[1,3], [5,6]];
this.print(pp);
Notice the page numbers are zero-based, so page 2 of the file is 1 in the script, page 6 is 7, etc.
Edit: Got the page numbers mixed up... Fixed now.
Copy link to clipboard
Copied
Thank you this worked. I have been trying to figure this out all week.