Aymkdn / html-to-pdfmake

This module permits to convert HTML to the PDFMake format
https://aymkdn.github.io/html-to-pdfmake/index.html
MIT License
545 stars 88 forks source link

ErrorHandler: TypeError: cellWidth.replace is not a function at index.js:385:105 #210

Closed wandaatest closed 5 months ago

wandaatest commented 5 months ago

my project only works on"html-to-pdfmake":"2.5.2", plz help me to fix the problem, is there any reason cause this? table width? i have no idea about this.. "html-to-pdfmake": "2.5.5", "html-to-pdfmake": "2.5.6", it also shows this consloe error ErrorHandler: TypeError: cellWidth.replace is not a function at index.js:385:105

Aymkdn commented 5 months ago

Please, provide the HTML code that you transform.

github-actions[bot] commented 5 months ago

This issue has been automatically closed because the requestor didn't provide any additional comment.

soeren-krueger commented 5 months ago

@Aymkdn Reproduction:

htmlToPdfmake(
  `<table style="width: 100%;">
    <tr>
      <td style="width: 160px;"></td>
    </tr>
  </table>`,
  { tableAutoSize: true }
);
Aymkdn commented 5 months ago

Thanks for the example. I'll have a look at it.

Aymkdn commented 5 months ago

It's now fixed with v2.5.7