Skip to content

[Bug] cellPadding not respected for unstyled table #1020

@vasilvalkov

Description

@vasilvalkov

When I create a PDF using the html property and the theme styles turned off, cellPadding values are ignored when calculating column widths. The result is cells contents touches together like this:
image

Here is a minimal reproduction in CodePen. I've commented out all the styles and in the HTML rendered table there is a small gut between columns (probably added by the browser), but when I export this to PDF this gut is gone and table looks like in the above picture.

In the reproduction I've set cellPadding: { left: 1, right: 1 } in all styles, bodyStyles, and headStyles, and also in the willDrawCell hook - all with no effect.

Here are the versions I use
in my real project
"jspdf": "^2.5.1",
"jspdf-autotable": "^3.7.1",

in the CodePen
"jspdf": "^2.5.1",
"jspdf-autotable": "^3.8.1",

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions