Skip to main content
Participant
October 8, 2020
Answered

Code for printing specific page

  • October 8, 2020
  • 3 replies
  • 727 views

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);

This topic has been closed for replies.
Correct answer try67

Use this:

 

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

3 replies

Participant
October 15, 2020

Thank you very much.

It works !

try67
Community Expert
try67Community ExpertCorrect answer
Community Expert
October 8, 2020

Use this:

 

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

Bernd Alheit
Community Expert
Community Expert
October 8, 2020

Info: the number of the first page is 0.