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

Code for printing specific page

Community Beginner ,
Oct 08, 2020 Oct 08, 2020

Hello,

I am looking for a javascript code that can send a specific page to the printer.
The people who will use it all have acrobat reader DC

 

I have foud the code below but is doesn't work for printing the first page.

 

var pp = this.getPrintParams();

pp.printRange = [1];

this.print(pp);

TOPICS
Acrobat SDK and JavaScript
616
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

correct answers 1 Correct answer

Community Expert , Oct 08, 2020 Oct 08, 2020

Use this:

 

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

Translate
Community Expert ,
Oct 08, 2020 Oct 08, 2020

Info: the number of the first page is 0.

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 ,
Oct 08, 2020 Oct 08, 2020

Use this:

 

var pp = this.getPrintParams();
pp.printRange = [[0,0]];
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
Community Beginner ,
Oct 15, 2020 Oct 15, 2020
LATEST

Thank you very much.

It works !

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