Skip to content

Commit

Permalink
tests/: added test for #3594.
Browse files Browse the repository at this point in the history
  • Loading branch information
julian-smith-artifex-com committed Jun 20, 2024
1 parent 1c14fbd commit ba241fa
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
Binary file added tests/resources/test_3594.pdf
Binary file not shown.
15 changes: 15 additions & 0 deletions tests/test_textextract.py
Original file line number Diff line number Diff line change
Expand Up @@ -314,3 +314,18 @@ def llen(texts):

if _stats:
pymupdf._log_items_clear()


def test_3594():
print()
d = pymupdf.open(os.path.abspath(f'{__file__}/../../tests/resources/test_3594.pdf'))
for i, p in enumerate(d.pages()):
text = p.get_text()
print('='*40)
print(f'Page {i}:')
for line in text.split('\n'):
print(f' {line!r}')
if pymupdf.mupdf_version_tuple < (1, 24, 3):
# We expect MuPDF warnings.
wt = pymupdf.TOOLS.mupdf_warnings()
assert wt

0 comments on commit ba241fa

Please sign in to comment.