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

153
Views
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
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!