PyFPDF: Align columns in row

Viewed 26

I want to align cell and multi-cell in the same row.

i = 0
for col in row:
    if i == 0:
        self.multi_cell(col_widths[i], 6, col, 1, new_x=XPos.LMARGIN, new_y=YPos.NEXT, align=alignments[i], fill=True)
    else:
        self.cell(col_widths[i], 6, col, 1, new_x=XPos.LMARGIN, new_y=YPos.NEXT, align=alignments[i], fill=True)
    i+=1

Result:

enter image description here

Thank you

0 Answers
Related