Skip to content

Commit 9a5ab22

Browse files
committed
Update PyMuPDF for changes in MuPDF 1.27.x branch.
1 parent 6591ab7 commit 9a5ab22

3 files changed

Lines changed: 4 additions & 2 deletions

File tree

src/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17597,6 +17597,8 @@ def width(self):
1759717597
TEXT_COLLECT_VECTORS = mupdf.FZ_STEXT_COLLECT_VECTORS
1759817598
TEXT_IGNORE_ACTUALTEXT = mupdf.FZ_STEXT_IGNORE_ACTUALTEXT
1759917599
TEXT_SEGMENT = mupdf.FZ_STEXT_SEGMENT
17600+
if mupdf_version_tuple >= (1, 27, 1):
17601+
TEXT_LAZY_VECTORS = mupdf.FZ_STEXT_LAZY_VECTORS
1760017602

1760117603
if mupdf_version_tuple >= (1, 26):
1760217604
TEXT_PARAGRAPH_BREAK = mupdf.FZ_STEXT_PARAGRAPH_BREAK

tests/test_2548.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def test_2548():
3232
# This checks that PyMuPDF 1.23.7 fixes this bug, and also that earlier
3333
# versions with updated MuPDF also fix the bug.
3434
rebased = hasattr(pymupdf, 'mupdf')
35-
if pymupdf.mupdf_version_tuple >= (1, 28):
35+
if pymupdf.mupdf_version_tuple >= (1, 27, 1):
3636
expected = ''
3737
elif pymupdf.mupdf_version_tuple >= (1, 27):
3838
expected = 'format error: No common ancestor in structure tree\nstructure tree broken, assume tree is missing'

tests/test_textextract.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,7 @@ def get_all_page_from_pdf(document, last_page=None):
387387
assert texts1 == texts0
388388

389389
wt = pymupdf.TOOLS.mupdf_warnings()
390-
if pymupdf.mupdf_version_tuple >= (1, 28):
390+
if pymupdf.mupdf_version_tuple >= (1, 27, 1):
391391
expected = ''
392392
assert wt == expected
393393
elif pymupdf.mupdf_version_tuple >= (1, 27):

0 commit comments

Comments
 (0)