bpampuch / pdfmake

Client/server side PDF printing in pure JavaScript
http://pdfmake.org
Other
11.44k stars 2.02k forks source link

Issue with styles when generating tables #2694

Closed jm-delgado closed 3 months ago

jm-delgado commented 4 months ago

Good morning,

I'm having some trouble when I use the method createPdf. It's very strange, because I couldn't determine what causes it.

Sometimes, a table within the document would be created ignoring the styles that I'm providing in the variable dd and it looks like this:

image

When it should look like this::

image

Also, when some cells in the table are empty, it throws this error, but we manage to place a blank space to avoid not creating the document: image

This was working in our production environment until January 15th more or less. I'm using the last version of the library and I've verify that the information that is passed to the function is the same when it works and when it doesn't. Also, changing the version of the library won't fix the issue.

We are working in SN and we tried with different browsers, OS, cleaning cache and cookies and the issue seems to be random. Did anyone have the same issue?

Best regards,

José

liborm85 commented 4 months ago

Malformed table row exception is caused by table row with not enough columns. If the rows have the correct number of columns including those colSpan, rowSpan the exception should not occur. Before January 15th probably your code generate different table contents.

jm-delgado commented 3 months ago

We got that under control adding information to every field, but we still have the issue with the styles on the tables. We are trying to identify if the issue is coming from the method "htmlToPdfmake" or when creating the PDF with createPdf.