How can I remove lines in html2pdf output caused by rowspan in table?

76 views Asked by At

I have table that uses rowspan and colspan for converting/exporting to PDF. The colspan mostly works, but I have an issue with rowspan that have a line between <td> while exporting.

What should I change in the code to remove lines as below?

line html2pdf rowspan

<tr>
  <td style="letter-spacing:0.2px;font-size: 10px;" width="10%" rowspan="2" class="p-2 text-center fw-bold"> Test </td>
  <td style="letter-spacing:0.2px;font-size: 10px;" width="10%" colspan="2" class="p-2 text-center fw-bold">yes / no</td>
</tr>
<tr>
  <td style="letter-spacing:0.2px;font-size: 10px;" class="p-2 text-center fw-bold">Yes</td>
  <td style="letter-spacing:0.2px;font-size: 10px;" class="p-2 text-center fw-bold">No</td>
</tr>
var opt = {
  margin: [30, 10],
  filename: 'exported.pdf',
  image: {
    type: 'jpeg',
    quality: 0.98
  },
  html2canvas: {
    scale: 2,
    scrollX: 0,
    scrollY: 0,
    useCORS: true,
    dpi: 96,
    letterRendering: true
  },
  jsPDF: {
    unit: 'mm',
    format: 'a4',
    orientation: 'portrait'
  },
  pagebreak: {
    mode: ['avoid-all'],
  }
};
0

There are 0 answers