Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

155
Visualizações
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
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda