Skip to content

Commit

Permalink
Added test for pymupdf#2238.
Browse files Browse the repository at this point in the history
  • Loading branch information
julian-smith-artifex-com committed Mar 7, 2023
1 parent 56ebe71 commit 0b517cc
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
Binary file added tests/resources/test2238.pdf
Binary file not shown.
13 changes: 13 additions & 0 deletions tests/test_general.py
Original file line number Diff line number Diff line change
Expand Up @@ -265,3 +265,16 @@ def test_2108():
else:
print('Asserting text!=text_expected')
assert text != text_expected


def test_2238():
filepath = f'{scriptdir}/resources/test2238.pdf'
doc = pymupdf.open(filepath)

first_page = doc.load_page(0).get_text('text', pymupdf.INFINITE_RECT())
last_page = doc.load_page(-1).get_text('text', pymupdf.INFINITE_RECT())

print(f'{first_page=}')
print(f'{last_page=}')
assert first_page = 'Hello World'
assert last_page = 'Hello World'

0 comments on commit 0b517cc

Please sign in to comment.