Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

JSPDF AUTOTABLE not displaying proper table Border

I want to export PDF with JSPDF and i m using plugin as "jspdf.autotable" for creating tables.now the problem is i want the formatting style like below:

enter image description here

As you can see there is a border outside the table but not in header part,i have achieved it but when the rows exceed the page height the formatting of table is not rendered properly.as autotable plugin don't have built in functionality to only have border outside of table. I have another solution to add whole HTML in pdf but i dont want pictures as a tables. please help with this ..

like image 413
Asha Koshti Avatar asked Dec 05 '25 03:12

Asha Koshti


1 Answers

As the author of the plugin I can't think of a simply way to accomplish this unfortunately. The only thing that comes to mind is that you can try utilizing for example the afterContent hook and add a rectangle on each page that is a few pixels larger than the table. In effect emulating a border.

I have seen this feature request mentioned before however and I'm considering adding it in a future release. Not in the near term though.

like image 76
Simon Bengtsson Avatar answered Dec 07 '25 17:12

Simon Bengtsson



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!