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

236
Visualizações
How i pass a media query or fix width and height using onclick event?

So i convert html page to pdf by using onclick event

My code is:-

function generatePDF() {
    var element = document.getElementById('invoice');

    var doc = {
        filename:     'myfile.pdf',
        image:        { type: 'jpeg', quality: 1 },
        html2canvas:  { dpi:192, letterRendering : true, scale: 2,  text Align: 'center', },
        jsPDF:        { unit: 'pt', format: 'letter', orientation: 'portrait', format: 'a4' },
    };

    html2pdf().set(doc).from(element).save();
}

By using onclick event the page will be downloaded successfully but the alignment of the content is changed. I want to give fix size so the content alignment is not change and also in mobile view the page will be downloaded at that defined fix size.

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