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

167
Views
Print.JS - set default print settings

I am trying to implement a print PDF option in an application. I found print.js and looks like this may help. However, I want to set default print options to make sure it prints to the correct scale (i.e.. 100%). Can print.js do this? If not, does anyone have a suggestion on how to accomplish this?

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

0

Not sure if this can be achieved straight forward or not. However there is a workaround for which you need to follow these steps:

  1. Convert your pdf files in base64 format
  2. Convert your base64 pdf to base64 png using pdf.js
  3. Render base64 pngs as html in img tag where you application related styles like margin, scales, etc. can be applied
  4. Print your html content with print.js

You can check this article solving similar type of problem https://medium.com/@vicky.sharma8127344/print-single-or-multiple-files-with-print-js-and-pdf-js-ab9c8347a309

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!