-
Notifications
You must be signed in to change notification settings - Fork 269
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
multi_cell table is broken #349
Comments
Hi @mcerveny Thanks for reporting this. Here is a unit test we should add, based on your code @mcerveny: def test_multi_cell_with_empty_contents(tmp_path): # issue 349
pdf = fpdf.FPDF()
pdf.add_page()
pdf.set_font('helvetica', size=10)
for i in range(1,5):
pdf.multi_cell(20, ln=3, txt=str(i))
pdf.ln(10)
for i in range(1,5):
pdf.multi_cell(20, ln=3, txt=str(i) if i>2 else "")
assert_pdf_equal(pdf, HERE / "multi_cell_with_empty_contents.pdf", tmp_path) Ping @gmischler: what do you think would be the best approach here, to keep the same behaviour as before? |
The simplest solution might be to check if |
…if "txt" is an empty string - close #349
…if "txt" is an empty string - close #349
Fixed! |
New features breaks table rendering with multi_cell().
multi_cell() is not rendered if txt="". It breaks table design (cell() is ok).
test.pdf
The text was updated successfully, but these errors were encountered: