-
Notifications
You must be signed in to change notification settings - Fork 251
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
fpdf.ln() not working in version 2.5.7 if last fpdf.cell() was called with empty txt #601
Comments
Thanks for reporting this! Looks like it's my fault and happened in #519. On a strategic level though, I'm not sure about the wisdom of maintaining |
Hence, while I would be OK to get rid of If you can submit a PR to fix the issue @gmischler, it would be very welcome 😊 |
Since it is not currently possible to change the font size within one of the relevant methods, I don't think that |
@gmischler: consider the following code from fpdf import FPDF
pdf = FPDF()
pdf.add_page()
pdf.set_font("helvetica", size=18)
pdf.cell(txt="Hello world")
print(pdf._lasth) # prints: 6.35
pdf.cell(txt="Hello world", h=50)
print(pdf._lasth) # prints: 50 As you can see |
Ah I see. |
In the following example line feed should use as height the height value of the last printed cell, which is the height of the current font size. This works in fpdf2 version 2.5.6, but no longer in version 2.5.7. In version 2.5.7 the used height value is 0.
Minimal code
Environment
test_2.5.6.pdf
test_2.5.7.pdf
The text was updated successfully, but these errors were encountered: