Skip to main content
Chemtoli007
Known Participant
January 17, 2017
Question

How to set up JavaScript to silently print first page and fourth page of a PDF document?

  • January 17, 2017
  • 2 replies
  • 2354 views

Dear,

What is the JavaScript code to silently print first and fourth page of a PDF document?

My PDF file has 7 pages but I want to create Print Button for printing only first and fourth pages.

Kind regards

This topic has been closed for replies.

2 replies

JR Boulay
Community Expert
Community Expert
July 1, 2017

One can almost "silently" print from a document: user will only see an alert box asking him to allow or not the printing, but he will not see the Print dialog box and cannot edit any settings.

If this is what you are looking for.

Acrobate du PDF, InDesigner et Photoshopographe
Participant
January 20, 2020

how can I do it. I want a button and print direcly. can you tell me how do it with javascript

try67
Community Expert
Community Expert
January 20, 2020

Read the documentation of the print method of the Document object as well as the PrintParams object.

Inspiring
June 29, 2017

Adobe considers this a security risk. If anyone could silently print a form without the user's knowledge then personal information could easily be stolen. You should be aware that a computer can print to any printer on a network or on the internet.

For you do this a special folder level script needs to be added to you computer and each users computer. You can then call this script from your form.