Skip to content

Commit 4567f72

Browse files
authored
Merge branch 'main' into address-4505
2 parents 1f2bf8c + 8d69fe8 commit 4567f72

File tree

5 files changed

+42
-8
lines changed

5 files changed

+42
-8
lines changed

.github/workflows/test_mupdf-release-branch.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727

2828
- name: test_mupdf-release-branch
2929
env:
30-
inputs_PYMUPDF_SETUP_MUPDF_BUILD: "git:--recursive --depth 1 --shallow-submodules --branch 1.25.x https://github.com/ArtifexSoftware/mupdf.git"
30+
inputs_PYMUPDF_SETUP_MUPDF_BUILD: "git:--recursive --depth 1 --shallow-submodules --branch 1.26.x https://github.com/ArtifexSoftware/mupdf.git"
3131
inputs_flavours: "0"
3232
inputs_sdist: "0"
3333
inputs_wheels_cps: "cp312*"

changes.txt

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,17 @@ Change Log
22
==========
33

44

5-
**Changes in version 1.25.6 ()**
5+
**Changes in version 1.26.0 ()**
6+
7+
* Use MuPDF-1.26.0.
68

79
* Fixed issues:
810

9-
* **Fixed** `4404 <https://github.com/pymupdf/PyMuPDF/issues/4404>`_:
10-
* **Fixed** `4439 <https://github.com/pymupdf/PyMuPDF/issues/4439>`_:
11-
* **Fixed** `4412 <https://github.com/pymupdf/PyMuPDF/issues/4412>`_:
12-
* **Fixed** `4324 <https://github.com/pymupdf/PyMuPDF/issues/4324>`_:
13-
* **Fixed** `4447 <https://github.com/pymupdf/PyMuPDF/issues/4447>`_:
11+
* **Fixed** `4324 <https://github.com/pymupdf/PyMuPDF/issues/4324>`_: cluster_drawings() fails to cluster horizontal and vertical thin lines
12+
* **Fixed** `4404 <https://github.com/pymupdf/PyMuPDF/issues/4404>`_: IndexError in page.get_links()
13+
* **Fixed** `4412 <https://github.com/pymupdf/PyMuPDF/issues/4412>`_: Regression? Spurious error? in insert_pdf in v1.25.4
14+
* **Fixed** `4439 <https://github.com/pymupdf/PyMuPDF/issues/4439>`_: New Xml class from data does not work - bug in code
15+
* **Fixed** `4447 <https://github.com/pymupdf/PyMuPDF/issues/4447>`_: Stroke color of annotations cannot be correctly set
1416

1517
* Other:
1618

docs/document.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1305,7 +1305,7 @@ For details on **embedded files** refer to Appendix 3.
13051305
pair: join_duplicates; Document.insert_pdf
13061306
pair: show_progress; Document.insert_pdf
13071307

1308-
.. method:: insert_pdf(docsrc, from_page=-1, to_page=-1, start_at=-1, rotate=-1, links=True, annots=True, widgets=True, join_duplicates=False, show_progress=0, final=1)
1308+
.. method:: insert_pdf(docsrc, *, from_page=-1, to_page=-1, start_at=-1, rotate=-1, links=True, annots=True, widgets=True, join_duplicates=False, show_progress=0, final=1)
13091309

13101310
PDF only: Copy the page range **[from_page, to_page]** (including both) of PDF document *docsrc* into the current one. Inserts will start with page number *start_at*. Value -1 indicates default values. All pages thus copied will be rotated as specified. Links, annotations and widgets can be excluded in the target, see below. All page numbers are 0-based.
13111311

tests/resources/test_4363.pdf

757 KB
Binary file not shown.

tests/test_textextract.py

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -780,3 +780,35 @@ def test_extendable_textpage():
780780

781781
path3 = os.path.normpath(f'{__file__}/../../tests/test_extendable_textpage3.pdf')
782782
document.save(path3)
783+
784+
785+
def test_4363():
786+
print()
787+
print(f'{pymupdf.version=}')
788+
path = os.path.normpath(f'{__file__}/../../tests/resources/test_4363.pdf')
789+
n = 0
790+
texts = list()
791+
with pymupdf.open(path) as document:
792+
assert len(document) == 1
793+
page = document[0]
794+
t = page.search_for('tour')
795+
print(f'{t=}')
796+
n += len(t)
797+
text = page.get_text()
798+
texts.append(text)
799+
print(f'{n=}')
800+
print(f'{len(texts)=}')
801+
text = texts[0]
802+
print('text:')
803+
print(f'{text=}')
804+
text_expected = (
805+
'Deal Roadshow SiteTour\n'
806+
'We know your process. We know your standard.\n'
807+
'Professional Site Tour Video Productions for the Capital Markets.\n'
808+
'1\n'
809+
)
810+
if text != text_expected:
811+
print(f'Expected:\n {text_expected!r}')
812+
print(f'Found:\n {text!r}')
813+
assert 0
814+

0 commit comments

Comments
 (0)