I am using jsPDF's autotable function to generate a complex table. I was wondering if it's possible to calculate the resulting table's dimensions in order to ensure that:
a. text will not be truncated within cells b. the whole table is nicely centered and fits in one page, no matter how big that one page is
I am seeing getTextWidth() and getTextDimensions() as potential helpers to achieve this but the first one only calculates width without size or weight and the second one doesn't seem to be calculating height properly.
I wouldn't mind switching to a different JS PDF table library if you have any better suggestion.
Any help is appreciated, Thank you.
Tried using getTextWidth() and getTextDimensions() but the results seem to be inconsistent. For a large table in width and height, I am getting truncated text within cells and sometimes weird word wrapping and that's what I am trying to correct.