Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ReportLab render right border for table cells?

There are LINEBELOW and LINEABOVE in the reportlab documentation. But i can't find a way do define right or left borders (LINELEFT,LINERIGHT).

Any suggestion how to render cells with right border only?

Edit:

I discovered 'INNERGRID' which allows me to put a border between two cells:

('INNERGRID',(0,0),(1,0),0.3*mm,(0,0,0))

This will renders a black border between the 1st and 2nd cell of the 1st row:

┌───────╥───────┐
│ cell1 ║ cell2 │    ║ = Border
└───────╨───────┘    │ = cell

But what I'm looking for is something like:

╓───────┬───────╖
║ cell1 │ cell2 ║
╙───────┴───────╜
like image 271
T. Christiansen Avatar asked May 16 '26 08:05

T. Christiansen


1 Answers

There are 'LINEBEFORE' <- left border, and 'LINEAFTER' <- right border, for this objective in ReportLab.

Documentation here: https://docs.reportlab.com/reportlab/userguide/ch7_tables/ in the section called "TableStyle Line Commands".

like image 197
Дмитрий Селиверстов Avatar answered May 18 '26 22:05

Дмитрий Селиверстов



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!