Skip to main content
Participant
February 23, 2017
Answered

Batch Printing Page 2 onwards (Action)

  • February 23, 2017
  • 1 reply
  • 471 views

Hello

I have this java script line that prints the 1st page only of all documents I select.

this.print(false, 0, 0);

Is there any way I can edit it to print from page 2 - end of document (ignoring page 1)

Many Thanks

Mick

This topic has been closed for replies.
Correct answer Karl Heinz Kremer

Take a look at the documentation for Doc.print(): Acrobat DC SDK Documentation - Doc.print()

As you can see, the two parameters that are set to 0 in your line of code determine the starting and end page. To print the second page, the first '0' in your code has to be changed to a 1, and to print to the end of the document, you need to specify the last page in the document as the third parameter. This can be done using the following line:

this.print(false, 1, this.numPages-1);

1 reply

Karl Heinz  Kremer
Community Expert
Karl Heinz KremerCommunity ExpertCorrect answer
Community Expert
February 23, 2017

Take a look at the documentation for Doc.print(): Acrobat DC SDK Documentation - Doc.print()

As you can see, the two parameters that are set to 0 in your line of code determine the starting and end page. To print the second page, the first '0' in your code has to be changed to a 1, and to print to the end of the document, you need to specify the last page in the document as the third parameter. This can be done using the following line:

this.print(false, 1, this.numPages-1);