diff --git a/changes.txt b/changes.txt index b73417706..5a4469652 100644 --- a/changes.txt +++ b/changes.txt @@ -2,7 +2,7 @@ Change Log ========== -**Changes in version 1.27.1** () +**Changes in version 1.27.1** (2026-02-11) * Use MuPDF-1.27.1. diff --git a/src/__init__.py b/src/__init__.py index bde83e99c..df5f03c39 100644 --- a/src/__init__.py +++ b/src/__init__.py @@ -17576,6 +17576,7 @@ def width(self): TEXT_CLIP = mupdf.FZ_STEXT_CLIP if mupdf_version_tuple >= (1, 27, 1): TEXT_LAZY_VECTORS = mupdf.FZ_STEXT_LAZY_VECTORS +if mupdf_version_tuple >= (1, 27, 2): TEXT_FUZZY_VECTORS = mupdf.FZ_STEXT_FUZZY_VECTORS TEXT_PARAGRAPH_BREAK = mupdf.FZ_STEXT_PARAGRAPH_BREAK diff --git a/tests/resources/test_4907.pdf b/tests/resources/test_4907.pdf new file mode 100644 index 000000000..6d966307b Binary files /dev/null and b/tests/resources/test_4907.pdf differ diff --git a/tests/test_general.py b/tests/test_general.py index 05f6db8c6..7449010c0 100644 --- a/tests/test_general.py +++ b/tests/test_general.py @@ -2195,3 +2195,13 @@ def process_document(document): def test_4746(): archive = pymupdf.Archive('.') archive.add(__file__, 'foo') + + +def test_4907(): + print() + path = os.path.normpath(f'{__file__}/../../tests/resources/test_4907.pdf') + with pymupdf.open(path) as document: + for i, page in enumerate(document): + print(f'{i=}') + display_list = page.get_displaylist(annots=False) + text_page = display_list.get_textpage()