Python FPDP multi_cell just returns a blank

258 views Asked by At

I am using the multi_cell() function from FPDF in Python.

However every time I call it I just get a blank space where the cell should be. If however I call cell() it displays the cell.

Code

See two examples below.

  1. Blank space with:
pdf.multi_cell(25,cell_height,ticket_no,1,0,"J",1)
  1. Cell populated with data with
pdf.cell(25,cell_height,ticket_no,1,0,"L",1)

Anyone got an idea what is going on here?

1

There are 1 answers

0
TessellatingHeckler On

Assuming PyFPDF, then cell() and multi_cell() take different parameters:

Cell:

MultiCell:

Multi_cell doesn't take ln, so by keeping that in, you end up shifting some of the parameters right by one, and saying:

align=0, fill="J"

instead of

align="J", fill=1