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

154
Visualizações
Html2PDF table spacing issue after export as pdf

I am using these options for exporting html to pdf of html2pdf.

html2pdf(document.getElementById('pm-pdf'), {
      margin:       10,
      filename:     'PM.pdf',
      image:        { type: 'jpeg', quality: 0.98 },
      html2canvas:  { scale: 2, logging: true, dpi: 192, letterRendering: true },
      jsPDF:        { unit: 'mm', format: 'a3', orientation: 'portrait' }
    });

and this is the view of table in my application. and you can see its well designed. Before export in pdf

But when i export it as pdf it get padding from top as you can see in the picture.after export in pdf

Solutions I already tried.

  1. removed all classes except 'row' and 'col'
  2. removed table and implemented with simple label and adding border on it.
  3. html2canvas.

*table code only

<table class="table table-bordered">
            <tbody>
            <tr class="prnt" *ngFor="let component of routineJobData.pmComponents[title]; let i=index">
              <td>{{component.label}}:</td>
              <td>{{component.value}}</td>
            </tr>
            </tbody>
          </table>
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