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

Print selected pages

Explorer ,
May 08, 2024 May 08, 2024

Copy link to clipboard

Copied

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

Views

311

Translate

Translate

Report

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

correct answers 1 Correct answer

Community Expert , May 08, 2024 May 08, 2024

Add this line before the print command:

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

Votes

Translate

Translate
Adobe Employee ,
May 08, 2024 May 08, 2024

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

Add this line before the print command:

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

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

LATEST

Thank you!

Votes

Translate

Translate

Report

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