Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

119
Views
Print multiple pdf's at once, javascript

I have multiple pdf's. With one button I want to open print preview for all documents seperately. The solution can be in javascript or jquery.

Thanks a lot

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

In most browsers, you cannot open multiple print dialogs. Instead, you can open them sequentially. The easiest way to print PDFs in Javascript is with PrintJS

Here's a recursive example that prints an array of PDFs.

var documentURLs = ["https://example.com/pdf1.pdf", "https://example.com/pdf2.pdf"]
function printDocuments(index){
   if(index > documentURLs.length){
        return;
   }
   printJS({
     printable: documentURLs[index],
     type: 'pdf',
     onPrintDialogClose: function () {
        printDocument(index+1)
     }
   })
}

You'd start it with printDocuments(0). Be sure to download and include the PrintJS library with <script src="print.js"></script>

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!