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

154
Views
making print remove div font/style

i didnt find it at all on search... I have a page with a div that shows the data chosen to print on a thermal printer. I'm using a simple js to print it. It works, but my thermal printer its printing it poorly, and some other posts point that if you just send it print, it will try to print a bit like images, making it unreadable. So, what I hope to make its to modify the print js code to transform it to text (keeping the table/line order) before send it to print. If possible, I want to force the page to refresh it after print.

print.js

 document.getElementById("doPrint").addEventListener("click", function() {
 var printContents = document.getElementById('printMe').innerHTML;
 var originalContents = document.body.innerHTML;
 document.body.innerHTML = printContents;
 window.print();
 document.body.innerHTML = originalContents;
 });

I'm self learner, so if i didnt make it clear enough i hope friends will bear with me. Of course, if you have other alternatives that works, i'm open to it.

about 4 years ago · Juan Pablo Isaza
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!