'How to remove extra spaces inside a cell in a table in reportlab
I am new to report lab and i would like to remove extra white spaces inside a cell in a table in reportlab
This is my code
def add_in_pdf_report(self):
table = []
styleN = styles["BodyText"]
for i in range(len(self.cells_list)):
column = []
for j in range(len(self.cells_list[i])):
if self.font_size != 10:
styleD = ParagraphStyle('title', fontSize =8)
column.append(Paragraph(str(self.cells_list[i][j]),styleN))
table.append(column)
_t = Table(table)
tStyle = TableStyle([("BOX",(0,0),(-1,-1),0.10,"#4983c6"),
("GRID",(0,0),(-1,-1),0.10,"#4983c6")])
_t.setStyle(tStyle)
self.report.pdf_element_list.append(KeepTogether(_t))
this creates table like this picture
this is the table i wantedpicture
I want to remove the extra white spaces inside the cell...
Please help
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
