Skip to content

Commit 9df123a

Browse files
tests/: added test for #3594.
1 parent 766db6c commit 9df123a

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

tests/resources/test_3594.pdf

7.94 MB
Binary file not shown.

tests/test_textextract.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -314,3 +314,18 @@ def llen(texts):
314314

315315
if _stats:
316316
pymupdf._log_items_clear()
317+
318+
319+
def test_3594():
320+
print()
321+
d = pymupdf.open(os.path.abspath(f'{__file__}/../../tests/resources/test_3594.pdf'))
322+
for i, p in enumerate(d.pages()):
323+
text = p.get_text()
324+
print('='*40)
325+
print(f'Page {i}:')
326+
for line in text.split('\n'):
327+
print(f' {line!r}')
328+
if pymupdf.mupdf_version_tuple < (1, 24, 3):
329+
# We expect MuPDF warnings.
330+
wt = pymupdf.TOOLS.mupdf_warnings()
331+
assert wt

0 commit comments

Comments
 (0)