-
Notifications
You must be signed in to change notification settings - Fork 653
Open
Labels
@fareshan
Description
Description of the bug
get_area became not working
I get this error: AttributeError: 'Rect' object has no attribute 'get_area'
How to reproduce the bug
Open Google Colab and put this script:
%pip install pymupdf
import fitz # PyMuPDF
# Create a dummy PDF document
doc = fitz.open()
page = doc.new_page()
# Test the get_area() function
area_in_inches = page.rect.get_area("in")
print(f"Area of the page in square inches: {area_in_inches}")
=> Error:
AttributeError: 'Rect' object has no attribute 'get_area'
Documentation:
https://pymupdf.readthedocs.io/en/latest/rect.html#Rect.get_area
The problem exists even in older versions of pymupdf.
I was not getting the problem with the same code before. I don't know what has changed recently so that get_area became not usable
PyMuPDF version
1.26.5
Operating system
MacOS
Python version
3.11