Skip to content
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

cell() computes wrong width #351

Closed
mcerveny opened this issue Mar 7, 2022 · 1 comment
Closed

cell() computes wrong width #351

mcerveny opened this issue Mar 7, 2022 · 1 comment

Comments

@mcerveny
Copy link

mcerveny commented Mar 7, 2022

Something wrong between 2.5.0 -> 2.5.1 with cell() width compute (with markdown=True)

test_2.5.1.pdf
test_2.5.0.pdf

Testing code:

import fpdf

pdf = fpdf.FPDF(orientation='portrait', unit='mm', format='A4')
pdf.add_page()
pdf.set_fill_color(255, 255, 0)
pdf.set_font('helvetica',size=10)
for rep in range(5,20):
  pdf.cell(markdown=True, txt="**" + "i"*rep + "M**")
  pdf.cell(ln=1,txt="XXX", fill=True)
for rep in range(5,20):
  pdf.cell(markdown=True, txt="" + "i"*rep + "M")
  pdf.cell(ln=1,txt="XXX", fill=True)
pdf.output('test.pdf')
@mcerveny mcerveny added the bug label Mar 7, 2022
@Lucas-C
Copy link
Member

Lucas-C commented Mar 7, 2022

Thanks for reporting this @mcerveny!

I have found a fix. Commit should be merged very soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants