Closed luicfrr closed 6 months ago
Define the width of a table is super tricky.
An easy fix for your case is to add the attribute data-pdfmake="{'widths':['40%','40%']}"
to the <table>
. Autocalculate this width seems to much complex to be reliable...
This issue has been automatically closed because the requestor didn't provide any additional comment.
Hello, thanks for your awesome project
I'm facing a table widths parsing issue. I'm using a wysiwyg editor to generate my html template and this is the html table I'm getting:
But after parsing it to PDFMake my table is not taking
80%
of pdf width as shown in image bellow:After some tests with parsed result I've noticed that if I change
table.widths
to[ "40%", "40%" ]
my table is now at correct80%
of screen size. I think this is something related to size parsing.Here's my both parsed tables together (top table is original parsed and bellow is modificated):
I think this leads us to another problem of: if a table is
width: 80%
and a table row iswidth: 30%
so in screen it should be30%
of table's80%
.