Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Print specific pages multiple times

Guest
Aug 28, 2017 Aug 28, 2017

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

TOPICS
Acrobat SDK and JavaScript
366
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 28, 2017 Aug 28, 2017

Use this code:

var pp = this.getPrintParams();

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

this.print(pp);

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Aug 28, 2017 Aug 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?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 28, 2017 Aug 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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Aug 28, 2017 Aug 28, 2017
LATEST

Yes, they use free reader. That solution will work! Smart adding a field so there will be no misunderstandings. Thank you very much! You have been of great help.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines