-
Notifications
You must be signed in to change notification settings - Fork 661
Closed
Labels
Fixed in next releasedocumentation issuefix developedrelease schedule to be determinedrelease schedule to be determined
Description
Description of the bug
PyMuPDF incorrectly inserts text when the fontsize and fontname are not explictly passed to the insert_text function.
How to reproduce the bug
` font_size = 35
font_name = "helvetica-bold"
#this is fine
text = "some random text"
point = pymupdf.Point(
page.rect.width / 2 - (pymupdf.get_text_length(text , font_name,font_size) / 2), 100)
page.insert_text(point, text , fontsize = font_size, fontname = font_name)
#this uses a slightly different font and size, despite giving the function the arguments in the expected order
point = pymupdf.Point(
page.rect.width / 2 - (pymupdf.get_text_length(text, font_name,font_size) / 2), 150)
page.insert_text(point, text , font_size, font_name)`
PyMuPDF version
1.25.1
Operating system
Windows
Python version
3.12
Metadata
Metadata
Assignees
Labels
Fixed in next releasedocumentation issuefix developedrelease schedule to be determinedrelease schedule to be determined