Jspdf-autotable: Edit a cell's borders one by one?

Created on 12 May 2020  路  7Comments  路  Source: simonbengtsson/jsPDF-AutoTable

Hi!
Is there a standard way to draw a horizontal line between the header and the body?
Or a way to edit a cell so only its bottom border is drawn?
Or a workaround is needed?
Thanks!

enhancement help wanted

Most helpful comment

You currently need to draw a line yourself. If you want to do this I suggest doing so in the didDrawCell hook. That said this is a use case that would be great supporting better to more easily be able to draw more scientific looking tables such as the attached one.

Results-of-data-collection-on-scientific-paper

All 7 comments

You currently need to draw a line yourself. If you want to do this I suggest doing so in the didDrawCell hook. That said this is a use case that would be great supporting better to more easily be able to draw more scientific looking tables such as the attached one.

Results-of-data-collection-on-scientific-paper

Hello,

you can read this link https://stackoverflow.com/questions/58294682/jspdf-with-autotable-how-to-put-top-border-on-row-or-cells-in-row
and modify the code in jspdf.plugin.autotable.js at 2023-2025 like indicated
for adding a bottom border to a cell, use this in "DidParseCell" (after selecting th good cell) :
HookData.cell.styles.borders = "b"; HookData.cell.styles.lineWidth = 0.1;
"b" is for bottom

hope this can help you

HI,
@BadApples11 ty for your insight! badly the link is dead, and HookData.cell.styles.borders = "b"; seems without no effect for me :/

ty in advance,
Kevin

Hi,
I tried the link and it's dead. But the link doesn't go to the text (?)
Copy the the text and not the link :
https://stackoverflow.com/questions/58294682/jspdf-with-autotable-how-to-put-top-border-on-row-or-cells-in-row
hope it would help you

I can help in this by providing some config in each cell so you can customise border width, colour and pattern i.e dashed for each direction separately

@prpateldev What do you wating for?

@edycarreyes99 I have already made this feature and it's merged https://github.com/simonbengtsson/jsPDF-AutoTable/pull/730

Was this page helpful?
0 / 5 - 0 ratings

Related issues

simonbengtsson picture simonbengtsson  路  4Comments

prakashsam picture prakashsam  路  4Comments

Alorse picture Alorse  路  4Comments

tapz picture tapz  路  3Comments

AminBangash picture AminBangash  路  5Comments