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

168
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
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