Highlighted

Code for printing specific page

Community Beginner ,
Oct 08, 2020

Copy link to clipboard

Copied

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

Most Valuable Participant
Correct answer by try67 | Most Valuable Participant

Use this:

 

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

TOPICS
Acrobat SDK and JavaScript

Views

39

Likes

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

Code for printing specific page

Community Beginner ,
Oct 08, 2020

Copy link to clipboard

Copied

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

Most Valuable Participant
Correct answer by try67 | Most Valuable Participant

Use this:

 

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

TOPICS
Acrobat SDK and JavaScript

Views

40

Likes

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
Oct 08, 2020 0
Adobe Community Professional ,
Oct 08, 2020

Copy link to clipboard

Copied

Info: the number of the first page is 0.

Likes

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
Reply
Loading...
Oct 08, 2020 0
Most Valuable Participant ,
Oct 08, 2020

Copy link to clipboard

Copied

Use this:

 

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

Likes

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
Reply
Loading...
Oct 08, 2020 0
Community Beginner ,
Oct 15, 2020

Copy link to clipboard

Copied

Thank you very much.

It works !

Likes

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
Reply
Loading...
Oct 15, 2020 0