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

Print selected pages

Explorer ,
May 08, 2024 May 08, 2024

I'm using Run a Javascript to print pages 1 and 3 of a document using this code:

 

var x = this.getPrintParams();
x.printRange = [[0,0], [2,2]];
this.print(x);

 

It works, but it pops up the print dialog box first.  I'm wondering if there is a way to bypass the print dialog box and directly print pages 1 and 3.  Thanks.

TOPICS
JavaScript , PDF , PDF forms
978
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
1 ACCEPTED SOLUTION
Community Expert ,
May 08, 2024 May 08, 2024

Add this line before the print command:

x.interactive = pp.constants.interactionLevel.automatic;

View solution in original post

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
Adobe Employee ,
May 08, 2024 May 08, 2024

Hi there

Hope you are doing well and thanks for reaching out.

The workflow you are trying to achieve is might be possible using JavaScript. For more information please check the help pages listed below:
https://acrobatusers.com/tutorials/javascript_console/
https://helpx.adobe.com/acrobat/using/applying-actions-scripts-pdfs.html

Hope it will help

Regards
Amal

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 ,
May 08, 2024 May 08, 2024

Add this line before the print command:

x.interactive = pp.constants.interactionLevel.automatic;

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
Explorer ,
May 08, 2024 May 08, 2024
LATEST

Thank you!

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