CSS formatting does not apply in HTML2PDF plugin

0

I'm using the html2pdf plugin, but when trying to use CSS :

  

table {line-height: 10px}

The same is not applied, I did not find anything in the plugin documentation, does anyone know how to fix it?

Example of what does CSS " table { line-height: 10px } "

table { line-height: 10px }
<table style="width:100%">
  <tr>
    <th>Firstname</th>
    <th>Lastname</th>
    <th>Age</th>
  </tr>
  <tr>
    <td>Jill</td>
    <td>Smith</td>
    <td>50</td>
  </tr>
  <tr>
    <td>Eve</td>
    <td>Jackson</td>
    <td>94</td>
  </tr>
</table>
    
asked by anonymous 05.09.2017 / 22:32

1 answer

0

Actually html2pdf has several limitations on using css, you can really check if it is the case of one of these limitations, then your options would be:

  • Create an issue in the official repository of the project;

  • If it is urgent, create a project fork and identify and solve the problem (do not forget to create a pull-request in the original project if you can hehe);

  • Test a solution with JavaScript, using pdf.js and html2canvas, as described above in this issue .

I hope I have helped with something:)

    
05.09.2017 / 22:45