diff --git a/.gitattributes b/.gitattributes
new file mode 100644
index 000000000..d72fd520b
--- /dev/null
+++ b/.gitattributes
@@ -0,0 +1 @@
+*.pdf binary
diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md
deleted file mode 100644
index e89c89c60..000000000
--- a/.github/ISSUE_TEMPLATE/bug_report.md
+++ /dev/null
@@ -1,32 +0,0 @@
----
-name: Bug report
-about: Create a report to help us improve
-title: ''
-labels: bug
-assignees: JorjMcKie
-
----
-
-_**Please provide all mandatory information!**_
-
-## Describe the bug (mandatory)
-A clear and concise description of what the bug is.
-
-## To Reproduce (mandatory)
-Explain the steps to reproduce the behavior, For example, include a minimal code snippet, example files, etc.
-
-## Expected behavior (optional)
-Describe what you expected to happen (if not obvious).
-
-## Screenshots (optional)
-If applicable, add screenshots to help explain your problem.
-
-## Your configuration (mandatory)
- - Operating system, potentially version and bitness
- - Python version, bitness
- - PyMuPDF version, installation method (**wheel** or **generated** from source).
-
-For example, the output of `print(sys.version, "\n", sys.platform, "\n", fitz.__doc__)` would be sufficient (for the first two bullets).
-
-## Additional context (optional)
-Add any other context about the problem here.
diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml
new file mode 100644
index 000000000..7fdb600ce
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/bug_report.yml
@@ -0,0 +1,93 @@
+name: Bug Report
+description: Create a bug report for PyMuPDF
+
+# We omit `title: "..."` so that the field defaults to blank. If we set it to
+# empty string, Github seems to reject this .yml file.
+
+body:
+
+ - type: textarea
+ id: description
+ attributes:
+ label: Description of the bug
+ description: |
+ A clear and concise description of the bug.
+
+ validations:
+ required: true
+
+ - type: textarea
+ id: reproduce
+ attributes:
+ label: How to reproduce the bug
+
+ # Should not word-wrap this description here.
+ description: |
+ * Explain the steps required to reproduce the bug.
+ * Include required code snippets, example files, etc.
+ * Describe what you expected to happen (if not obvious).
+ * If applicable, add screenshots to help explain the problem.
+ * Include any other information that could be relevant, for example information about the Python environment.
+
+ For problems when building or installing PyMuPDF:
+ * Give the **exact** build/install commands that were run.
+ * Give the **complete** output from these commands.
+
+ validations:
+ required: true
+
+# - type: markdown
+# attributes:
+# value: |
+# # The information below is required.
+
+ - type: dropdown
+ id: version
+ attributes:
+ label: PyMuPDF version
+ options:
+ - 1.26.6
+ - 1.26.5
+ - 1.26.4
+ - 1.26.3
+ - 1.26.1
+ - 1.26.0
+ - 1.25.x or earlier
+ - Built from source
+ description: |
+ * For example from `pymupdf.pymupdf_version`.
+ * We generally only look at bugs in the most recent release of PyMuPDF.
+ validations:
+ required: true
+
+ - type: dropdown
+ id: os_name
+ attributes:
+ label: Operating system
+ #multiple: true
+ options:
+ -
+ - Windows
+ - Linux
+ - MacOS
+ - OpenBSD
+ - Other
+ validations:
+ required: true
+
+ - type: dropdown
+ id: python_version
+ attributes:
+ label: Python version
+ #multiple: true
+ # Need quotes around `3.10` otherwise it is treated as a number and shows as `3.1`.
+ options:
+ -
+ - "3.14"
+ - "3.13"
+ - "3.12"
+ - "3.11"
+ - "3.10"
+ - "3.9"
+ validations:
+ required: true
diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md
index f5ed2dc54..92ad708a0 100644
--- a/.github/ISSUE_TEMPLATE/feature_request.md
+++ b/.github/ISSUE_TEMPLATE/feature_request.md
@@ -3,7 +3,7 @@ name: Feature request
about: Suggest an idea for this project
title: ''
labels: enhancement
-assignees: JorjMcKie
+assignees:
---
diff --git a/.github/workflows/build_wheels.yml b/.github/workflows/build_wheels.yml
new file mode 100644
index 000000000..40d29767f
--- /dev/null
+++ b/.github/workflows/build_wheels.yml
@@ -0,0 +1,162 @@
+name: Build wheels
+
+on:
+ workflow_dispatch:
+ inputs:
+
+ flavours:
+ description: 'If set, we build separate PyMuPDF and PyMuPDFb wheels.'
+ type: boolean
+ default: false
+
+ sdist:
+ type: boolean
+ default: true
+
+ wheels_linux_aarch64:
+ type: boolean
+ default: true
+
+ wheels_linux_auto:
+ type: boolean
+ default: true
+
+ wheels_linux_pyodide:
+ type: boolean
+ default: false
+
+ wheels_windows_auto:
+ type: boolean
+ default: true
+
+ wheels_macos_auto:
+ type: boolean
+ default: true
+
+ wheels_cps:
+ description: 'wheels_cps: sets $CIBW_BUILD, E.g. "cp310* cp311*".'
+ type: string
+
+ PYMUPDF_SETUP_MUPDF_BUILD:
+ description: 'Value for PYMUPDF_SETUP_MUPDF_BUILD, e.g.: git:--branch master https://github.com/ArtifexSoftware/mupdf.git'
+ type: string
+ default: '-'
+
+ #PYMUPDF_SETUP_MUPDF_BUILD_TYPE:
+ # description: 'Value for PYMUPDF_SETUP_MUPDF_BUILD, e.g. debug.'
+ # type: string
+ # default: '-'
+ # We can't currently have more than 10 inputs
+
+ PYMUPDF_SETUP_PY_LIMITED_API:
+ description: 'If not "0", we build a single wheel for each platform.'
+ type: string
+ default: ''
+
+jobs:
+
+ build_sdist:
+ if: ${{ inputs.sdist }}
+ name: Build sdist
+ runs-on: ubuntu-latest
+
+ steps:
+ - uses: actions/checkout@v4
+
+ - name: Build sdist
+ env:
+ inputs_wheels_default: 0
+ inputs_sdist: 1
+ inputs_flavours: ${{inputs.flavours}}
+ inputs_PYMUPDF_SETUP_MUPDF_BUILD: ${{inputs.PYMUPDF_SETUP_MUPDF_BUILD}}
+ run:
+ python scripts/gh_release.py
+
+ - uses: actions/upload-artifact@v4
+ with:
+ name: sdist-${{ matrix.os }}
+ path: dist/*.tar.gz
+
+
+ build_wheels:
+ #if: ${{ inputs.wheels }}
+ name: Build wheels on ${{ matrix.os }}
+ runs-on: ${{ matrix.os }}
+ strategy:
+ matrix:
+ # 2024-05-08: Need to specify macos-13/14 to get x86_64/arm64.
+ os: [ubuntu-latest, windows-2019, macos-13, macos-14]
+
+ # Avoid cancelling of all cibuildwheel runs after a single failure.
+ fail-fast: false
+
+ steps:
+
+ - uses: actions/checkout@v4
+
+ # Get Python 3.12 x32 and x64 on Windows. (As of 2023-10-12 these are not
+ # always available by default.)
+ #
+ - name: Install Python 3.12 x32 on Windows.
+ if: runner.os == 'Windows'
+ uses: actions/setup-python@v5
+ with:
+ python-version: '3.12'
+ architecture: x86
+ - name: Install Python 3.12 x64 on Windows.
+ if: runner.os == 'Windows'
+ uses: actions/setup-python@v5
+ with:
+ python-version: '3.12'
+
+ # Get Python for running cibuildwheel. This also ensures that 'python'
+ # works on MacOS, where it seems only 'python3' is available by default.
+ #
+ # Note that it seem to be important on MacOS not to specify a
+ # Python version here with `python-version: '3.12'` - this makes
+ # `python-config3` return settings for Python-3.12, instead of for
+ # whatever Python is being used by cibuildwheel.
+ #
+ - uses: actions/setup-python@v5
+
+ # On Linux, get qemu so we can build for aarch64.
+ #
+ - name: Set up QEMU
+ if: runner.os == 'Linux'
+ uses: docker/setup-qemu-action@v1
+ with:
+ platforms: all
+
+ - name: gh_release
+ # Doesn't seem to be a way to passing inputs.* on command
+ # line, so we set environment instead. E.g. see:
+ # https://github.com/orgs/community/discussions/27088
+ #
+ env:
+ inputs_flavours: ${{inputs.flavours}}
+ inputs_sdist: ${{inputs.sdist}}
+
+ inputs_wheels_linux_aarch64: ${{inputs.wheels_linux_aarch64}}
+ inputs_wheels_linux_auto: ${{inputs.wheels_linux_auto}}
+ inputs_wheels_linux_pyodide: ${{inputs.wheels_linux_pyodide}}
+ #inputs_wheels_macos_arm64: ${{inputs.wheels_macos_arm64}}
+ inputs_wheels_macos_auto: ${{inputs.wheels_macos_auto}}
+ inputs_wheels_windows_auto: ${{inputs.wheels_windows_auto}}
+
+ inputs_PYMUPDF_SETUP_MUPDF_BUILD: ${{inputs.PYMUPDF_SETUP_MUPDF_BUILD}}
+ #inputs_PYMUPDF_SETUP_MUPDF_BUILD_TYPE: ${{inputs.PYMUPDF_SETUP_MUPDF_BUILD_TYPE}}
+
+ inputs_wheels_cps: ${{inputs.wheels_cps}}
+
+ PYMUPDF_SETUP_PY_LIMITED_API: ${{inputs.PYMUPDF_SETUP_PY_LIMITED_API}}
+
+ run:
+ python scripts/gh_release.py
+
+
+ # Upload generated wheels, to be accessible from github Actions page.
+ #
+ - uses: actions/upload-artifact@v4
+ with:
+ name: wheels-${{ matrix.os }}
+ path: ./wheelhouse/*.whl
diff --git a/.github/workflows/cla.yml b/.github/workflows/cla.yml
new file mode 100644
index 000000000..1ff2e9591
--- /dev/null
+++ b/.github/workflows/cla.yml
@@ -0,0 +1,34 @@
+name: "CLA Assistant"
+on:
+ pull_request_target:
+ types: [opened,closed,synchronize]
+
+jobs:
+ CLAAssistant:
+ runs-on: ubuntu-latest
+ steps:
+ - name: "CLA Assistant"
+ if: (github.event.comment.body == 'recheck' || github.event.comment.body == 'I have read the CLA Document and I hereby sign the CLA') || github.event_name == 'pull_request_target'
+ # Beta Release
+ uses: contributor-assistant/github-action@v2.4.0
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ # the below token should have repo scope and must be manually added by you in the repository's secret
+ PERSONAL_ACCESS_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
+ with:
+ path-to-signatures: 'signatures/version1/cla.json'
+ path-to-document: 'https://artifex.com/documents/Artifex%20Contributor%20License%20Agreement.pdf'
+ # branch should not be protected
+ branch: 'CLA'
+ allowlist:
+
+ # the following are the optional inputs - If the optional inputs are not given, then default values will be taken
+ #remote-organization-name: enter the remote organization name where the signatures should be stored (Default is storing the signatures in the same repository)
+ #remote-repository-name: enter the remote repository name where the signatures should be stored (Default is storing the signatures in the same repository)
+ #create-file-commit-message: 'For example: Creating file for storing CLA Signatures'
+ #signed-commit-message: 'For example: $contributorName has signed the CLA in #$pullRequestNo'
+ #custom-notsigned-prcomment: 'pull request comment with Introductory message to ask new contributors to sign'
+ #custom-pr-sign-comment: 'The signature to be committed in order to sign the CLA'
+ #custom-allsigned-prcomment: 'pull request comment when all contributors has signed, defaults to **CLA Assistant Lite bot** All Contributors have signed the CLA.'
+ #lock-pullrequest-aftermerge: false - if you don't want this bot to automatically lock the pull request after merging (default - true)
+ #use-dco-flag: true - If you are using DCO instead of CLA
diff --git a/.github/workflows/test-valgrind.yml b/.github/workflows/test-valgrind.yml
new file mode 100644
index 000000000..244fcb95a
--- /dev/null
+++ b/.github/workflows/test-valgrind.yml
@@ -0,0 +1,27 @@
+name: Test valgrind
+
+on:
+ workflow_dispatch:
+ schedule:
+ - cron: '13 6 * * *'
+
+jobs:
+
+ valgrind:
+ name: valgrind
+ runs-on: ubuntu-latest
+ strategy:
+ matrix:
+ args: [
+ '',
+ '-m "git:--branch master https://github.com/ArtifexSoftware/mupdf"',
+ '-m "git:--branch 1.26.x https://github.com/ArtifexSoftware/mupdf"',
+ ]
+ fail-fast: false
+
+ steps:
+ - uses: actions/checkout@v4
+ - uses: actions/setup-python@v5
+ - name: valgrind
+ run:
+ python scripts/test.py ${{matrix.args}} -P 1 -T valgrind build test
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
new file mode 100644
index 000000000..c7b59c722
--- /dev/null
+++ b/.github/workflows/test.yml
@@ -0,0 +1,64 @@
+# Run scripts/test.py directly on multiple Github servers. Instead of
+# specifying individual inputs, we support a single string input which is used
+# for the command line directly.
+#
+# This ensures we behave exactly like scripts/test.py, without confusion caused
+# by having to translate between differing APIs.
+
+name: Tests
+
+on:
+ #schedule:
+ # - cron: '47 4 * * *'
+ #pull_request:
+ # branches: [main]
+ workflow_dispatch:
+ inputs:
+ args:
+ type: string
+ default: ''
+ description: 'Arguments to pass to scripts/test.py'
+
+jobs:
+
+ test:
+ name: Test
+ runs-on: ${{ matrix.os }}
+ strategy:
+ matrix:
+ os: [ubuntu-latest, windows-2022, macos-13, macos-14]
+
+ # Avoid cancelling of all runs after a single failure.
+ fail-fast: false
+
+ steps:
+
+ - uses: actions/checkout@v4
+
+ - uses: actions/setup-python@v5
+ with:
+ python-version: '3.12'
+
+ # https://github.com/pypa/cibuildwheel/issues/2114
+ # https://cibuildwheel.pypa.io/en/stable/faq/#emulation
+ #
+ - name: Set up QEMU
+ if: runner.os == 'Linux' && runner.arch == 'X64'
+ uses: docker/setup-qemu-action@v3
+ with:
+ platforms: all
+
+ - name: test
+ env:
+ PYMUPDF_test_args: ${{inputs.args}}
+ run:
+ python scripts/test.py -a PYMUPDF_test_args
+
+ # Upload generated wheels, to be accessible from github Actions page.
+ #
+ - uses: actions/upload-artifact@v4
+ with:
+ path: |
+ wheelhouse/pymupdf*.whl
+ wheelhouse/pymupdf*.tar.gz
+ name: artifact-${{ matrix.os }}
diff --git a/.github/workflows/test_multiple.yml b/.github/workflows/test_multiple.yml
new file mode 100644
index 000000000..54f09444b
--- /dev/null
+++ b/.github/workflows/test_multiple.yml
@@ -0,0 +1,39 @@
+# Run scripts/test.py on multiple OS's (Windows, Linux, MacOS x64, MacOS arm64)
+# and with multiple specifications of MuPDF (PyMuPDF's hard-coded default,
+# master branch, release branch).
+
+name: multiple
+
+on:
+ workflow_dispatch:
+ inputs:
+ args:
+ type: string
+ default: ''
+ description: 'Additional arguments to scripts/test.py'
+ schedule:
+ - cron: '13 6 * * *'
+
+jobs:
+
+ multiple:
+ name: multiple
+ runs-on: ${{ matrix.os }}
+ strategy:
+ matrix:
+ os: [ubuntu-latest, windows-2022, macos-13, macos-14]
+ args: [
+ '',
+ '-m "git:--branch master https://github.com/ArtifexSoftware/mupdf"',
+ '-m "git:--branch 1.26.x https://github.com/ArtifexSoftware/mupdf"',
+ ]
+ fail-fast: false
+
+ steps:
+ - uses: actions/checkout@v4
+ - uses: actions/setup-python@v5
+ - name: multiple
+ env:
+ PYMUPDF_test_args: ${{inputs.args}}
+ run:
+ python scripts/test.py ${{matrix.args}} wheel test -a PYMUPDF_test_args
diff --git a/.github/workflows/test_pyodide.yml b/.github/workflows/test_pyodide.yml
new file mode 100644
index 000000000..bc1e823ef
--- /dev/null
+++ b/.github/workflows/test_pyodide.yml
@@ -0,0 +1,41 @@
+name: Test pyodide
+
+# Build and test pyodide wheels using cibuildwheel.
+
+on:
+ workflow_dispatch:
+
+ schedule:
+ - cron: '13 5 * * *'
+
+jobs:
+
+ pyodide:
+ name: pyodide
+ runs-on: ubuntu-latest
+ strategy:
+ matrix:
+ # 2025-09-05: We don't test with default mupdf because mupdf-1.26.7
+ # does not have the required pyodide rpath changes.
+ args: [
+ # '',
+ '-m "git:--branch master https://github.com/ArtifexSoftware/mupdf"',
+ '-m "git:--branch 1.26.x https://github.com/ArtifexSoftware/mupdf"',
+ ]
+ fail-fast: false
+
+ steps:
+ - uses: actions/checkout@v4
+ - uses: actions/setup-python@v5
+ with:
+ python-version: 3.12
+
+ - name: pyodide
+ run:
+ python scripts/test.py ${{matrix.args}} --cibw-pyodide 1 cibw
+
+ # We do not use upload-artifact@v4 because it fails due to us creating
+ # identically-named wheels.
+ #- uses: actions/upload-artifact@v4
+ # with:
+ # path: ./wheelhouse/*.whl
diff --git a/.github/workflows/test_quick.yml b/.github/workflows/test_quick.yml
new file mode 100644
index 000000000..e07aadf35
--- /dev/null
+++ b/.github/workflows/test_quick.yml
@@ -0,0 +1,46 @@
+name: test_quick
+
+on:
+ pull_request:
+ branches: [main]
+
+ workflow_dispatch:
+ inputs:
+ args:
+ type: string
+ default: ''
+ description: 'Additional arguments to scripts/test.py'
+
+jobs:
+
+ master:
+ name: mupdf master
+ runs-on: ${{ matrix.os }}
+ strategy:
+ matrix:
+ os: [ubuntu-latest]
+ fail-fast: false
+ steps:
+ - uses: actions/checkout@v4
+ - uses: actions/setup-python@v5
+ - name: mupdf master
+ env:
+ PYMUPDF_test_args: ${{inputs.args}}
+ run:
+ python scripts/test.py build test -m 'git:--branch master https://github.com/ArtifexSoftware/mupdf.git' -a PYMUPDF_test_args
+
+ release:
+ name: mupdf release
+ runs-on: ${{ matrix.os }}
+ strategy:
+ matrix:
+ os: [ubuntu-latest]
+ fail-fast: false
+ steps:
+ - uses: actions/checkout@v4
+ - uses: actions/setup-python@v5
+ - name: mupdf release
+ env:
+ PYMUPDF_test_args: ${{inputs.args}}
+ run:
+ python scripts/test.py build test -m 'git:--branch 1.26.x https://github.com/ArtifexSoftware/mupdf.git' -a PYMUPDF_test_args
diff --git a/.github/workflows/test_sysinstall.yml b/.github/workflows/test_sysinstall.yml
new file mode 100644
index 000000000..a913de748
--- /dev/null
+++ b/.github/workflows/test_sysinstall.yml
@@ -0,0 +1,50 @@
+name: Test sysinstall
+
+on:
+ schedule:
+ - cron: '13 4 * * *'
+ workflow_dispatch:
+ inputs:
+ args:
+ description: 'Extra args for scripts/sysinstall.py.'
+
+jobs:
+
+ sysinstall:
+ name: Test sysinstall
+ runs-on: ${{ matrix.os }}
+ strategy:
+ matrix:
+ os: [ubuntu-latest]
+
+ steps:
+
+ - uses: actions/checkout@v4
+
+ # It seems to be important not to install a custom python here,
+ # because `sudo` (which we need to use when installing to /usr/local
+ # etc) always ends up running the default python, even if we set
+ # $PATH etc. So for example we can end up with mupdf files and
+ # pymupdf files being installed into .../python3.11/site-packages and
+ # .../python3.10/site-packages, and tests all fail to import pymupdf.
+ #
+ #- uses: actions/setup-python@v5
+ #with:
+ # # 3.12 doesn't have setuptools. As of 2024-01-03, MuPDF build requires setuptools before it
+ # # sees `--venv` and defers to a venv, so we currently have to force use of python 3.11.
+ # python-version: '3.11'
+
+
+ - name: sysinstall_venv
+ env:
+ PYMUDF_SCRIPTS_SYSINSTALL_ARGS_POST: ${{inputs.args}}
+ run:
+ # Use venv.
+ python3 scripts/sysinstall.py --mupdf-git '--branch master https://github.com/ArtifexSoftware/mupdf.git'
+
+ - name: sysinstall_sudo
+ env:
+ PYMUDF_SCRIPTS_SYSINSTALL_ARGS_POST: ${{inputs.args}}
+ run:
+ # Do not use a venv, instead install required packages with sudo.
+ python3 scripts/sysinstall.py --mupdf-git '--branch master https://github.com/ArtifexSoftware/mupdf.git' --pip sudo --root /
diff --git a/.gitignore b/.gitignore
index e55e79db4..23e954719 100644
--- a/.gitignore
+++ b/.gitignore
@@ -4,3 +4,4 @@
*.swp
build/
demo/README.rst
+docs/build
\ No newline at end of file
diff --git a/.python-version b/.python-version
new file mode 100644
index 000000000..e4fba2183
--- /dev/null
+++ b/.python-version
@@ -0,0 +1 @@
+3.12
diff --git a/.readthedocs.yaml b/.readthedocs.yaml
new file mode 100644
index 000000000..d20a78bb1
--- /dev/null
+++ b/.readthedocs.yaml
@@ -0,0 +1,28 @@
+# .readthedocs.yaml
+# Read the Docs configuration file
+# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
+
+# Required
+version: 2
+
+# Set the version of Python and other tools you might need
+build:
+ os: ubuntu-20.04
+ tools:
+ python: "3.9"
+ # You can also specify other tool versions:
+ # nodejs: "16"
+ # rust: "1.55"
+ # golang: "1.17"
+
+# Build documentation in the docs/ directory with Sphinx
+sphinx:
+ configuration: docs/conf.py
+
+# If using Sphinx, optionally build your docs in additional formats such as PDF
+formats: all
+
+# Optionally declare the Python requirements required to build your docs
+python:
+ install:
+ - requirements: docs/requirements.txt
diff --git a/.vs/ProjectSettings.json b/.vs/ProjectSettings.json
index d33b3d63d..8d55e0d69 100644
--- a/.vs/ProjectSettings.json
+++ b/.vs/ProjectSettings.json
@@ -1,3 +1,3 @@
{
- "CurrentProjectSetting": "Keine Konfigurationen"
-}
\ No newline at end of file
+ "CurrentProjectSetting": ""
+}
diff --git a/.vs/VSWorkspaceState.json b/.vs/VSWorkspaceState.json
index d282b3b24..48ce01f3d 100644
--- a/.vs/VSWorkspaceState.json
+++ b/.vs/VSWorkspaceState.json
@@ -2,6 +2,6 @@
"ExpandedNodes": [
""
],
- "SelectedNode": "\\README.md",
+ "SelectedNode": "",
"PreviewInSolutionExplorer": false
-}
\ No newline at end of file
+}
diff --git a/README.md b/README.md
index 9b7b511be..b9f99949d 100644
--- a/README.md
+++ b/README.md
@@ -1,114 +1,60 @@
-# PyMuPDF 1.19.1
+# PyMuPDF
-
+**PyMuPDF** is a high performance **Python** library for data extraction, analysis, conversion & manipulation of [PDF (and other) documents](https://pymupdf.readthedocs.io/en/latest/the-basics.html#supported-file-types).
-Release date: October 23, 2021
+# Community
+Join us on **Discord** here: [#pymupdf](https://discord.gg/TSpYGBW4eq)
-On **[PyPI](https://pypi.org/project/PyMuPDF)** since August 2016: [](https://pepy.tech/project/pymupdf)
-# Author
-[Jorj X. McKie](mailto:jorj.x.mckie@outlook.de), based on original code by [Ruikai Liu](mailto:lrk700@gmail.com).
+# Installation
-# Introduction
+**PyMuPDF** requires **Python 3.9 or later**, install using **pip** with:
-PyMuPDF (current version 1.19.1) is a Python binding with support for [MuPDF](https://mupdf.com/) (current version 1.19.*), a lightweight PDF, XPS, and E-book viewer, renderer, and toolkit, which is maintained and developed by Artifex Software, Inc.
+`pip install PyMuPDF`
-MuPDF can access files in PDF, XPS, OpenXPS, CBZ, EPUB and FB2 (e-books) formats, and it is known for its top performance and high rendering quality.
+There are **no mandatory** external dependencies. However, some [optional features](#pymupdf-optional-features) become available only if additional packages are installed.
-With PyMuPDF you can access files with extensions like ".pdf", ".xps", ".oxps", ".cbz", ".fb2" or ".epub". In addition, about 10 popular image formats can also be handled like documents: ".png", ".jpg", ".bmp", ".tiff", etc..
+You can also try without installing by visiting [PyMuPDF.io](https://pymupdf.io/#examples).
-> In partnership with [Artifex](https://artifex.com/), PyMuPDF is now also available for commercial licensing. This agreement has no impact on use cases, that are compliant with the open-source license AGPL. Please see the "License and Copyright" section below for additional information.
# Usage
-For all supported document types (i.e. **_including images_**) you can
-* decrypt the document
-* access meta information, links and bookmarks
-* render pages in raster formats (PNG and some others), or the vector format SVG
-* search for text
-* extract text and images
-* convert to other formats: PDF, (X)HTML, XML, JSON, text
-* perform Optical Character Recognition if Tesseract is installed
-
-> To some degree, PyMuPDF can therefore be used as an [image converter](https://github.com/pymupdf/PyMuPDF/wiki/How-to-Convert-Images): it can read a range of input formats and can produce **Portable Network Graphics (PNG)**, **Portable Anymaps** (**PNM**, etc.), **Portable Arbitrary Maps (PAM)**, **Adobe Postscript** and **Adobe Photoshop** documents, making the use of other graphics packages obselete in these cases. But interfacing with e.g. PIL/Pillow for image input and output is easy as well.
-
-For **PDF documents,** there exists a plethora of additional features: they can be created, joined or split up. Pages can be inserted, deleted, re-arranged or modified in many ways (including annotations and form fields).
-
-* Images and fonts can be extracted or inserted.
- > You may want to have a look at [this](https://github.com/pymupdf/PyMuPDF-Utilities/blob/master/examples/image-maintenance.py) cool GUI example script, which lets you **_insert, delete, replace_** or **_re-position_** images under your visual control.
- > If [fontTools](https://pypi.org/project/fonttools/) is installed, subsets can be built for eligible fonts based on their usage in the document. Especially for new PDFs, this can lead to significant file size reductions.
-* Embedded files are fully supported.
-* PDFs can be reformatted to support double-sided printing, posterizing, applying logos or watermarks
-* Password protection is fully supported: decryption, encryption, encryption method selection, permission level and user / owner password setting.
-* Support of the **PDF Optional Content** concept for images, text and drawings.
-* Low-level PDF structures can be accessed and modified.
-* **Command line module** ``"python -m fitz ..."``. A versatile utility with the following features
+Basic usage is as follows:
- - **encryption / decryption / optimization**
- - creation of **sub-documents**
- - document **joining**
- - **image / font extraction**
- - full support of **embedded files**
- - **_layout-preserving text extraction_** (all documents)
+```python
+import pymupdf # imports the pymupdf library
+doc = pymupdf.open("example.pdf") # open a document
+for page in doc: # iterate the document pages
+ text = page.get_text() # get plain text encoded as UTF-8
-
-Have a look at the basic [demos](https://github.com/pymupdf/PyMuPDF-Utilities/tree/master/demo), the [examples](https://github.com/pymupdf/PyMuPDF-Utilities/tree/master/examples) (which contain complete, working programs), and the **recipes** section of our [Wiki](https://github.com/pymupdf/PyMuPDF/wiki) sidebar, which contains more than a dozen of guides in How-To-style.
+```
# Documentation
-Our documentation, written using Sphinx, is available in various formats from the following sources. It currently is a combination of reference guide and user manual. For a **quick start** look at the [tutorial](https://pymupdf.readthedocs.io/en/latest/tutorial.html) and the [recipes](https://pymupdf.readthedocs.io/en/latest/faq.html) chapters.
-
-* You can view it online at [Read the Docs](https://readthedocs.org/projects/pymupdf/). This site also provides download options for PDF.
-* The search function on Read the Docs does not work for me currently. If you want a working searchable local version, please download a zipped HTML for [here](https://github.com/pymupdf/PyMuPDF-optional-material/tree/master/doc/pymupdf.zip).
-* Find a Windows help file [here](https://github.com/pymupdf/PyMuPDF-optional-material/tree/master/doc/PyMuPDF.chm).
-
-The latest changelog can be viewed [here](https://pymupdf.readthedocs.io/en/latest/changes.html).
-
-
-# Installation
-
-PyMuPDF requires **Python 3.6 or later**.
-
-Python wheels exist for **Windows** (32bit and 64bit), **Linux** (64bit, Intel and ARM) and **Mac OSX** (64bit, Intel only), so it can be installed from [PyPI](https://pypi.org/search/?q=pymupdf) in the usual way:
-
-```
-python -m pip install --upgrade pip
-python -m pip install --upgrade pymupdf
-```
+Full documentation can be found on [pymupdf.readthedocs.io](https://pymupdf.readthedocs.io).
-There are **no mandatory** external dependencies. However, a some **optional features** become available if additional packages are installed:
-* [Pillow](https://pypi.org/project/Pillow/) for using pillow image output directly from PyMuPDF
-* [fontTools](https://pypi.org/project/fonttools/) for creating font subsets
-* [pymupdf-fonts](https://pypi.org/project/pymupdf-fonts/) contains some nice fonts for your text output
-* [Tesseract-OCR](https://github.com/tesseract-ocr/tesseract) for optical character recognition in images and document pages. Tesseract is separate software, not a Python package. To enable OCR functions in PyMuPDF, the system environment variable `"TESSDATA_PREFIX"` must be defined and contain the `tessdata` folder name of the Tesseract installation location
+# Optional Features
-Older wheels - also with support for older Python versions - can be found [here](https://github.com/pymupdf/PyMuPDF-Optional-Material/tree/master/wheels-upto-Py3.5>) and on PyPI.
+* [fontTools](https://pypi.org/project/fonttools/) for creating font subsets.
+* [pymupdf-fonts](https://pypi.org/project/pymupdf-fonts/) contains some nice fonts for your text output.
+* [Tesseract-OCR](https://github.com/tesseract-ocr/tesseract) for optical character recognition in images and document pages.
-> Starting with v1.18.15, to minimize network traffic we no longer redundantly store wheels in this repository's `releases` folder. You can find older versions back to v1.9.2 on [PyPI](https://pypi.org/project/PyMuPDF/#history). Sources for every release continue to be stored in [here](https://github.com/pymupdf/PyMuPDF/releases).
-Other platforms **require installation from sources**, follow [these](https://pymupdf.readthedocs.io/en/latest/installation.html) instructions in the documentation.
-> **Note:** If `pip` cannot find a wheel that is compatible with your platform, it will automatically start an installation from sources - **_which will fail_** if MuPDF is not installed on your system.
+# About
-This repo's folder [installation](https://github.com/pymupdf/PyMuPDF/tree/master/installation) contains several platform-specific source installation scripts contributed by users. You may also find the following Wiki pages useful:
+**PyMuPDF** adds **Python** bindings and abstractions to [MuPDF](https://mupdf.com/), a lightweight **PDF**, **XPS**, and **eBook** viewer, renderer, and toolkit. Both **PyMuPDF** and **MuPDF** are maintained and developed by [Artifex Software, Inc](https://artifex.com).
-* [Ubuntu installation experience](https://github.com/pymupdf/PyMuPDF/wiki/Ubuntu-Installation-Experience).
-* [Windows wheels](https://github.com/pymupdf/PyMuPDF/wiki/Windows-Binaries-Generation).
+**PyMuPDF** was originally written by [Jorj X. McKie](mailto:jorj.x.mckie@outlook.de).
# License and Copyright
-In order to comply with MuPDF’s dual licensing model, PyMuPDF has entered into an agreement with Artifex who has the right to sublicense PyMuPDF to third parties.
-PyMuPDF and MuPDF are now available under both, open-source AGPL and commercial license agreements.
+**PyMuPDF** is available under [open-source AGPL](https://www.gnu.org/licenses/agpl-3.0.html) and commercial license agreements. If you determine you cannot meet the requirements of the **AGPL**, please contact [Artifex](https://artifex.com/contact/pymupdf-inquiry.php) for more information regarding a commercial license.
-Please read the full text of the [AGPL license agreement](https://www.gnu.org/licenses/agpl-3.0.html) (which is also included here in file COPYING) to ensure that your use case complies with the guidelines of this license. If you determine you cannot meet the requirements of the AGPL, please contact [Artifex](https://artifex.com/contact/) for more information regarding a commercial license.
-Artifex is the exclusive commercial licensing agent for MuPDF.
-Artifex, the Artifex logo, MuPDF, and the MuPDF logo are registered trademarks of Artifex Software Inc. © 2021 Artifex Software, Inc. All rights reserved.
-# Contact
-Please use the [Discussions](https://github.com/pymupdf/PyMuPDF/discussions) menu for questions, comments, or asking for help, and submit issues [here](https://github.com/pymupdf/PyMuPDF/issues). If you wish, you can also contact me directly via jorj.x.mckie@outlook.de.
diff --git a/READMEb.md b/READMEb.md
new file mode 100644
index 000000000..3e1900038
--- /dev/null
+++ b/READMEb.md
@@ -0,0 +1,7 @@
+# PyMuPDFb
+
+This wheel contains [MuPDF](https://mupdf.readthedocs.io/) shared libraries for
+use by [PyMuPDF](https://pymupdf.readthedocs.io/).
+
+This wheel is shared by PyMuPDF wheels that are specific to different Python
+versions, significantly reducing the total size of a release.
diff --git a/READMEd.md b/READMEd.md
new file mode 100644
index 000000000..e37c5c0ea
--- /dev/null
+++ b/READMEd.md
@@ -0,0 +1,4 @@
+# PyMuPDFd
+
+This wheel contains [MuPDF](https://mupdf.readthedocs.io/) build-time files
+that were used to build [PyMuPDF](https://pymupdf.readthedocs.io/).
diff --git a/changes.rst b/changes.txt
similarity index 56%
rename from changes.rst
rename to changes.txt
index 563e70cd3..ff33fb6a0 100644
--- a/changes.rst
+++ b/changes.txt
@@ -1,17 +1,1533 @@
Change Log
-===========
+==========
+
+
+**Changes in version 1.26.6**
+
+* Fixed issues:
+
+ * **Fixed** `4699 `_: cannot find ExtGState resource
+ * **Fixed** `4712 `_: Crash with "corrupted double-linked list"
+ * **Fixed** `4742 `_: 'Rect' object has no attribute 'get_area'
+ * **Fixed** `4746 `_: Document.__init__() got an unexpected keyword argument 'encoding'
+
+
+**Changes in version 1.26.5** (2025-10-10)
+
+* Use MuPDF-1.26.10.
+
+* Fixed issues:
+
+ * **Fixed** `2883 `_: Improve the Python type annotations for fitz_new
+ * **Fixed** `4507 `_: Bugs in pyodide
+ * **Fixed** `4613 `_: Thai and number blocks are not auto-scaled and get wrong hyphen when using in insert_htmlbox
+ * **Fixed** `4700 `_: pymupdf.open() processes .zip file without raising
+ * **Fixed** `4716 `_: Problems with unreadable characters
+
+* Other:
+
+ * Supported Python versions are now 3.9-3.14.
+ * We now define all class methods explicitly instead of with dynamic assignment; this improves type hints.
+ * Removed `pymupdf.utils.Shape` class, was duplicate of `pymupdf.Shape`.
+ * Allow use of cibuildwheel to build and test on Pyodide.
+ * Fixed various Pyodide bugs.
+ * In documentation, added section about Linux wheels and glibc compatibility.
+ * Improved documentation of pymupdf.open()'s arg.
+ * Retrospectively mark `4544 `_ as fixed in 1.26.4.
+
+
+**Changes in version 1.26.4 (2025-08-25)**
+
+* Use MuPDF-1.26.7.
+
+* Fixed issues:
+
+ * **Fixed** `3806 `_: pdf to image rendering ignore optional content offs
+ * **Fixed** `4388 `_: Incorrect PixMap from page due to cached data from other PDF
+ * **Fixed** `4457 `_: Wrong characters displayed after font subsetting (w/ native method)
+ * **Fixed** `4462 `_: delete_pages() does not accept a single int
+ * **Fixed** `4533 `_: Open PDF error segmentation fault
+ * **Fixed** `4544 `_: About pdf_clip_page
+ * **Fixed** `4565 `_: MacOS uses Tesseract and not Tesseract-OCR
+ * **Fixed** `4571 `_: Broken merged pdfs.
+ * **Fixed** `4590 `_: TypeError in utils.py scrub(): annot.update_file(buffer=...) is invalid
+ * **Fixed** `4614 `_: Intercept bad widgets when inserting to another PDF
+ * **Fixed** `4639 `_: pymupdf.mupdf.FzErrorGeneric: code=1: Director error: : 'JM_new_bbox_device_Device' object has no attribute 'layer_name'
+
+* Other:
+
+ * Check that #4392 `Segfault when running with pytest and -Werror` is fixed if PyMuPDF is built with swig>=4.4.
+ * Add `Page.clip_to_rect()`.
+ * Improved search for Tesseract data.
+ * Retrospectively mark #4496 as fixed in 1.26.1.
+ * Retrospectively mark #4503 as fixed in 1.26.3.
+ * Added experimental support for Graal.
+
+
+**Changes in version 1.26.3 (2025-07-02)**
+
+* Use MuPDF-1.26.3.
+
+* Fixed issues:
+
+ * **Fixed** `4462 `_: delete_pages() does not accept a single int
+ * **Fixed** `4503 `_: Undetected character styles
+ * **Fixed** `4527 `_: Rect.intersects() is much slower than necessary
+ * **Fixed** `4564 `_: Possible encoding issue in PDF metadata
+ * **Fixed** `4575 `_: Bug with IRect contains method
+
+* Other:
+
+ * Class Shape is now available as pymupdf.Shape.
+ * Added table cell markdown support.
+
+
+**Changes in version 1.26.2**
+
+[Skipped.]
+
+
+**Changes in version 1.26.1 (2025-06-11)**
+
+* Use MuPDF-1.26.2.
+
+* Fixed issues:
+
+ * **Fixed** `4520 `_: show_pdf_page does not like empty pages created by new_page
+ * **Fixed** `4524 `_: fitz.get_text ignores 'pages' kwarg
+ * **Fixed** `4412 `_: Regression? Spurious error? in insert_pdf in v1.25.4
+ * **Fixed** `4496 `_: pymupdf4llm with pymupdfpro
+
+* Other:
+
+ * Partial fix for `4503 `_: Undetected character styles
+ * New method `Document.rewrite_images()`, useful for reducing file size, changing image formats, or converting color spaces.
+ * `Page.get_text()`: restrict positional args to match docs.
+ * Removed bogus definition of class `Shape`.
+ * Removed release date from module, docs and changelog.
+ * `pymupdf.pymupdf_date` and `pymupdf.VersionDate` are now both None.
+ * They will be removed in a future release.
+
+
+**Changes in version 1.26.0 (2025-05-22)**
+
+* Use MuPDF-1.26.1.
+
+* Fixed issues:
+
+ * **Fixed** `4324 `_: cluster_drawings() fails to cluster horizontal and vertical thin lines
+ * **Fixed** `4363 `_: Trouble with searching
+ * **Fixed** `4404 `_: IndexError in page.get_links()
+ * **Fixed** `4412 `_: Regression? Spurious error? in insert_pdf in v1.25.4
+ * **Fixed** `4423 `_: pymupdf.mupdf.FzErrorFormat: code=7: cannot find object in xref error encountered after version 1.25.3
+ * **Fixed** `4435 `_: get_pixmap method stuck on one page
+ * **Fixed** `4439 `_: New Xml class from data does not work - bug in code
+ * **Fixed** `4445 `_: Broken XREF table incorrectly repaired
+ * **Fixed** `4447 `_: Stroke color of annotations cannot be correctly set
+ * **Fixed** `4479 `_: set_layer_ui_config() toggles all layers rather than just one
+ * **Fixed** `4505 `_: Follow Widget flag values up its parent structure
+
+* Other:
+
+ * Partial fixed for `4457 `_: Wrong characters displayed after font subsetting (w/ native method)
+ * Support image stamp annotations.
+ * Support recoloring pages.
+ * Added example of using Django's file storage API to open files with pymupdf.
+ * Clarified FreeText annotation color options.
+ We now raise an exception if an attempt is made to set attributes that can not be supported.
+ * Fixed potential segv in Pixmap.is_unicolor().
+ * Added runtime assert that that PyMuPDF and MuPDF were built with compatible
+ NDEBUG settings (related to `4390 `_).
+ * Simplified handling of filename/filetype when opening documents.
+ * Removed PDF linearization support.
+ * Calls to `Document.save()` with `linear` set to true will now raise an exception.
+ * See https://artifex.com/blog/mupdf-removes-linearisation for more information.
+
+**Changes in version 1.25.5 (2025-03-31)**
+
+* Fixed issues:
+
+ * **Fixed** `4372 `_: Text insertion fails due to missing /Resources object
+ * **Fixed** `4400 `_: Infinite loop in fill_textbox
+ * **Fixed** `4403 `_: Unable to get_text() - layer/clip nesting too deep
+ * **Fixed** `4415 `_: PDF page is mirrored, origin is at bottom-left
+
+* Other:
+
+ * Use MuPDF-1.25.6.
+ * Fixed MuPDF SEGV on MacOS with particular fonts.
+ * Fixed `Annot.get_textpage()`'s `clip` arg.
+ * Fixed Python-3.14 (pre-release) build error.
+
+
+**Changes in version 1.25.4 (2025-03-14)**
+
+* Use MuPDF-1.25.5.
+
+* Fixed issues:
+
+ * **Fixed** `4079 `_: Unexpected result for apply_redactions()
+ * **Fixed** `4224 `_: MuPDF error: format error: negative code in 1d faxd
+ * **Fixed** `4303 `_: page.get_image_info() returns outdated cached results after replacing image
+ * **Fixed** `4309 `_: FzErrorFormat Error When Deleting First Page
+ * **Fixed** `4336 `_: Major Performance Regression: pix.color_count is 150x slower in version 1.25.3 compared to 1.23.8
+ * **Fixed** `4341 `_: Invalid label retrieval when /Kids is an array of multiple /Nums
+
+* Other:
+
+ * Fixed handling of duplicate widget names when joining PDFs (PR #4347).
+ * Improved Pyodide build.
+ * Avoid SWIG-related build errors with Python-3.13 by disabling PY_LIMITED_API.
+
+
+**Changes in version 1.25.3 (2025-02-06)**
+
+* Use MuPDF-1.25.4.
+
+* Fixed issues:
+
+ * **Fixed** `4139 `_: Text color numbers change between 1.24.14 and 1.25.0
+ * **Fixed** `4141 `_: Some insertion methods fails for pages without a /Resources object
+ * **Fixed** `4180 `_: Search problems
+ * **Fixed** `4182 `_: Text coordinate extraction error
+ * **Fixed** `4245 `_: Highlighting issue distorted on recent versions
+ * **Fixed** `4254 `_: add_freetext_annot is drawing text outside the annotation box
+
+* Other:
+
+ * In annotations:
+ * Added support for subtype FreeTextCallout.
+ * Added support for rich text.
+ * Added miter_limit arg to insert_text*() to allow suppression of spikes caused by long miters.
+ * Add Widget Support to `Document.insert_pdf()`.
+ * Add `bibi` to span dicts.
+ * Add `synthetic' to char dict.
+ * Fixed Pyodide builds.
+
+
+**Changes in version 1.25.2 (2025-01-17)**
+
+* Fixed issues:
+
+ * **Fixed** `4055 `_: "Yes" for all checkboxes does not work for all PDF rendering engines.
+ * **Fixed** `4155 `_: samples_mv is unsafe
+ * **Fixed** `4162 `_: Got AttributeError, when tried to add Signature field
+ * **Fixed** `4186 `_: Incorrect handling of JPEG with color space CMYK image extraction
+ * **Fixed** `4195 `_: Pixmaps that are inverted and have an alpha channel are not rendered properly
+ * **Fixed** `4225 `_: pixmap.pil_save() fails due to colorspace definition
+ * **Fixed** `4232 `_: Incorrect Font style and Size
+
+* Other:
+
+ * Use Python's built-in glyphname <> unicode conversion.
+ * Improve speed of pixmap color inversion.
+ * Add new `char_flags` member to span dictionary, for example allows detection of invisible text.
+ * Detect image masks in TextPage output.
+ * Added `Pixmap.pil_image()`.
+
+
+**Changes in version 1.25.1 (2024-12-11)**
+
+* Use MuPDF-1.25.2.
+
+* Fixed issues:
+
+ * **Fixed** `4125 `_: memory leak while convert Pixmap's colorspace
+ * **Fixed** `4034 `_: Possible regression in pdf cleaning during save.
+
+
+**Changes in version 1.25.0 (2024-12-05)**
+
+* Use MuPDF-1.25.1.
+
+* Fixed issues:
+
+ * **Fixed** `4026 `_: page.get_text('blocks') output two piece of very similar text with different bbox
+ * **Fixed** `4004 `_: Segmentation Fault When Updating PDF Form Field Value
+ * **Fixed** `3887 `_: Subset Fonts problem using Fallback Font
+ * **Fixed** `3886 `_: Another issue with destroying PDF when inserting html
+ * **Fixed** `3751 `_: apply_redactions causes part of the page content to be hidden / transparent
+
+
+.. codespell:ignore-begin
+
+**Changes in version 1.24.14 (2024-11-19)**
+
+* Use MuPDF-1.24.11.
+
+* Fixed issues:
+
+ * **Fixed** `3448 `_: get_pixmap function removes the table and leaves just the content behind
+ * **Fixed** `3758 `_: Got "malloc(): unaligned tcache chunk detected Aborted (core dumped)" while using add_redact_annot/apply_redactions
+ * **Fixed** `3813 `_: Stories: Ordered list count broken with nested unordered list
+ * **Fixed** `3933 `_: font.valid_codepoints() - malfunction
+ * **Fixed** `4018 `_: PyMuPDF hangs when iterating over zero page PDF pages backwards
+ * **Fixed** `4043 `_: fullcopypage bug
+ * **Fixed** `4047 `_: Segmentation Fault in add_redact_annot
+ * **Fixed** `4050 `_: Content of dict returned by doc.embfile_info() does not fit to documentation
+
+* Other:
+
+ * Ensure that words from `Page.get_text()` never contain RTL/LTR char mixtures.
+ * Fix building with system MuPDF.
+ * Add dot product for points and vectors.
+
+
+**Changes in version 1.24.13 (2024-10-29)**
+
+* Fixed issues:
+
+ * **Fixed** `3848 `_: Piximap program crash
+ * **Fixed** `3950 `_: Unable to consistently extract field labels from PDFs
+ * **Fixed** `3981 `_: PyMuPDF 1.24.12 with pyinstaller throws error.
+ * **Fixed** `3994 `_: pix.color_topusage raise Segmentation fault (core dumped)
+
+
+**Changes in version 1.24.12 (2024-10-21)**
+
+* Fixed issues:
+
+ * **Fixed** `3914 `_: Ability to print MuPDF errors to logging instead of stdout
+ * **Fixed** `3916 `_: insert_htmlbox error: int too large to convert to float
+ * **Fixed** `3950 `_: Unable to consistently extract field labels from PDFs
+
+* Supported Python versions are now 3.9-3.13.
+
+ * Dropped support for Python-3.8 because end-of-life.
+ * Added support for Python-3.13 because now released.
+ * See: https://devguide.python.org/versions/
+
+
+**Changes in version 1.24.11 (2024-10-03)**
+
+* Use MuPDF-1.24.10.
+
+* Fixed issues:
+
+ * **Fixed** `3624 `_: Pdf file transform to image have a black block
+ * **Fixed** `3859 `_: doc.need_appearances() fails with "AttributeError: module 'pymupdf.mupdf' has no attribute 'PDF_TRUE' "
+ * **Fixed** `3863 `_: apply_redactions() does not work as expected
+ * **Fixed** `3905 `_: open stream can raise a FzErrorFormat error instead of FileDataError
+
+* Wheels now use the Python Stable ABI:
+
+ * There is one PyMuPDF wheel for each platform.
+ * Each wheel works with all supported Python versions.
+ * Each wheel is built using the oldest supported Python version (currently 3.8).
+ * There is no PyMuPDFb wheel.
+
+* Other:
+
+ * Improvements to get_text_words() with sort=True.
+ * Tests now always get the latest versions of required Python packages.
+ * Removed dependency on setuptools.
+ * Added item to PyMuPDF-1.24.10 changes below - fix of #3630.
+
+
+**Changes in version 1.24.10 (2024-09-02)**
+
+* Use MuPDF-1.24.9.
+
+* Fixed issues:
+
+ * **Fixed** `3450 `_: get_pixmap function takes too long to process
+ * **Fixed** `3569 `_: Invalid OCGs not ignored by SVG image creation
+ * **Fixed** `3603 `_: ObjStm compression and PDF linearization doesn't work together
+ * **Fixed** `3650 `_: Linebreak inserted between each letter
+ * **Fixed** `3661 `_: Update Document to check the /XYZ len
+ * **Fixed** `3698 `_: documentation issue - old code in the annotations documentation
+ * **Fixed** `3705 `_: Document.select() behaves weirdly in some particular kind of pdf files
+ * **Fixed** `3706 `_: extend Document.__getitem__ type annotation to reflect that the method also accepts slices
+ * **Fixed** `3727 `_: Method get_pixmap() make the program exit without any exceptions or messages
+ * **Fixed** `3767 `_: Cannot get Tessdata with Tesseract-OCR 5
+ * **Fixed** `3773 `_: Link.set_border gives TypeError: '<' not supported between instances of 'NoneType' and 'int'
+ * **Fixed** `3774 `_: fitz.__version__` does not work anymore
+ * **Fixed** `3789 `_: ValueError: not enough values to unpack (expected 3, got 2) is thrown when call insert_pdf
+ * **Fixed** `3820 `_: class improves namedDest handling
+
+ * **Fixed** `3630 `_: page.apply_redactions gives unwanted black rectangle
+
+* Other:
+
+ * Object streams and linearization cannot be used together; attempting to do
+ so will raise an exception. (#3603)
+ * Fixed handling of non-existing /Contents object.
+
+
+**Changes in version 1.24.9 (2024-07-24)**
+
+* Use MuPDF-1.24.8.
+
+
+**Changes in version 1.24.8 (2024-07-22)**
+
+* Fixed issues:
+
+ * **Fixed** `3636 `_: API documentation for the open function is not obvious to find.
+ * **Fixed** `3654 `_: docx parsing was broken in 1.24.7
+ * **Fixed** `3677 `_: Unable to extract subset font name using the newer versions of PyMuPDF : 1.24.6 and 1.24.7.
+ * **Fixed** `3687 `_: Page.get_text results in AssertionError for epub files
+
+Other:
+
+* Fixed various spelling mistakes spotted by codespell.
+* Improved how we modify MuPDF's default configuration on Windows.
+* Make text search to work with ligatures.
+
+
+**Changes in version 1.24.7 (2024-06-26)**
+
+* Fixed issues:
+
+ * **Fixed** `3615 `_: Document.pagemode or Document.pagelayout crashes for epub files
+ * **Fixed** `3616 `_: not last version reported
+
+
+**Changes in version 1.24.6 (2024-06-25)**
+
+* Use MuPDF-1.24.4
+
+* Fixed issues:
+
+ * **Fixed** `3599 `_: Story.fit_width() has a weird line
+ * **Fixed** `3594 `_: Garbled extraction for Amazon Sustainability Report
+ * **Fixed** `3591 `_: 'width' in Page.get_drawings() returns width equal as 0
+ * **Fixed** `3561 `_: ZeroDivisionError: float division by zero with page.apply_redactions()
+ * **Fixed** `3559 `_: SegFault 11 when empty H1 H2 H3 H4 etc element is used in insert_htmlbox
+ * **Fixed** `3539 `_: Add dotted gridline detection to table recognition
+ * **Fixed** `3519 `_: get_toc(simple=False) AttributeError: 'Outline' object has no attribute 'rect'
+ * **Fixed** `3510 `_: page.get_label() gets wrong label on the first page of doc
+ * **Fixed** `3494 `_: 1.24.2/1.24.3: spurious characters introduced when using subset_fonts and insert_pdf
+ * **Fixed** `3470 `_: subset_fonts error exit without exception/warning
+ * **Fixed** `3400 `_: set_toc alters link coordinates for some rotated pages on pymupdf 1.24.2
+ * **Fixed** `3347 `_: Incorrect links to points on pages having different heights
+ * **Fixed** `3237 `_: Set_metadata() does not work
+ * **Fixed** `3493 `_: Isolate PyMuPDF from other libraries; issues when PyMuPDF is loaded with other libraries like GdkPixbuf
+
+* Other:
+
+ * Fixed concurrent use of PyMuPDF caused by use of constant temporary filenames.
+
+ * Add musllinux x86_64 wheels to release.
+
+ * Added clearer version information:
+
+ * `pymupdf.pymupdf_version`.
+ * `pymupdf.mupdf_version`.
+ * `pymupdf.pymupdf_date`.
+
+
+**Changes in version 1.24.5 (2024-05-30)**
+
+* Fixed issues:
+
+ * **Fixed** `3479 `_: regression: fill_textbox: IndexError: pop from empty list
+ * **Fixed** `3488 `_: set_toc method error
+
+* Other:
+
+ * Some more fixes to use MuPDF floating formatting.
+ * Removed/disabled some unnecessary diagnostics.
+ * Fixed utils.do_links() crash.
+ * Experimental new functions `pymupdf.apply_pages()` and `pymupdf.get_text()`.
+ * Addresses wrong label generation for label styles "a" and "A".
+
+
+**Changes in version 1.24.4 (2024-05-16)**
+
+ * **Fixed** `3418 `_: Re-introduced bug, text align add_redact_annot
+ * **Fixed** `3472 `_: insert_pdf gives SystemError
+
+* Other:
+
+ * Fixed sysinstall test failing to remove all of prior installation before
+ new install.
+ * Fixed `utils.do_links()` crash.
+ * Correct `TextPage` creation Code.
+ * Unified various diagnostics.
+ * Fix bug in `page_merge()`.
+
+
+**Changes in version 1.24.3 (2024-05-09)**
+
+*
+ The Python module is now called `pymupdf`. `fitz` is still supported for
+ backwards compatibility.
+
+* Use MuPDF-1.24.2.
+
+* Fixed issues:
+
+ * **Fixed** `3357 `_: PyMuPDF==1.24.0 will hanging when using page.get_text("text")
+ * **Fixed** `3376 `_: Redacting results are not as expected in 1.24.x.
+ * **Fixed** `3379 `_: Documentation mismatch for get_text_blocks return value order.
+ * **Fixed** `3381 `_: Contents stream contains floats in scientific notation
+ * **Fixed** `3402 `_: Cannot add Widgets containing inter-field-calculation JavaScript
+ * **Fixed** `3414 `_: missing attribute set_dpi()
+ * **Fixed** `3430 `_: page.get_text() cause process freeze with certain pdf on v1.24.2
+
+* Other:
+
+ * New/modified methods:
+
+ * `Page.remove_rotation()`: new, set page rotation to zero while keeping appearance.
+
+ * Fixed some problems when checking for PDF properties.
+ * Fixed pip builds from sdist
+ (see discussion `3360 `_:
+ Alpine linux docker build failing "No matching distribution found for pymupdfb==1.24.1").
+
+
+**Changes in version 1.24.2 (2024-04-17)**
+
+* Removed obsolete classic implementation from releases
+ (previously available as module `fitz_old`).
+
+* Fixed issues:
+
+ * **Fixed** `3331 `_: Document.pages() is incorrectly type-hinted
+ * **Fixed** `3354 `_: PyMuPDF==1.24.1: AttributeError: property 'metadata' of 'Document' object has no setter
+
+* Other:
+
+ * New/modified methods:
+
+ * `Document.bake()`: new, make annotations / fields permanent content.
+ * `Page.cluster_drawings()`: new, identifies drawing items
+ (i.e. vector graphics or line-art)
+ that belong together based on their geometrical vicinity.
+ * `Page.apply_redactions()`: added new parameter `text`.
+ * `Document.subset_fonts()`: use MuPDF's `pdf_subset_fonts()` instead of PyMuPDF code.
+
+ * The `Document` class now supports page numbers specified as slices.
+ * Avoid causing MuPDF warnings.
+
+
+**Changes in version 1.24.1 (2024-04-02)**
+
+* Fixed issues:
+
+ * **Fixed** `3278 `_: apply_redactions moves some unredacted text
+ * **Fixed** `3301 `_: Be more permissive when classifying links as kind LINK_URI
+ * **Fixed** `3306 `_: Text containing capital 'ET' not appearing as annotation
+
+* Other:
+
+ * Use MuPDF-1.24.1.
+ * Support ObjStm Compression.
+ Methods `Document.save()`, `Document.ez_save()` and `Document.write()`
+ now support new parameters `use_objstm`, compression_effort` and
+ `preserve_metadata`.
+
+
+**Changes in version 1.24.0 (2024-03-21)**
+
+* Fixed issues:
+
+ * **Fixed** `3281 `_: Preparing metadata (pyproject.toml) did not run successfully
+ * **Fixed** `3279 `_: PyMuPDF no longer builds in Alpine Linux
+ * **Fixed** `3257 `_: apply_redactions() deleting text outside of annoted box
+ * **Fixed** `3216 `_: AttributeError: 'Annot' object has no attribute '__del__'
+ * **Fixed** `3207 `_: get_drawings's items is missing line from h path operator
+ * **Fixed** `3201 `_: Memory leaks when merging PDFs
+ * **Fixed** `3197 `_: page.get_text() returns hexadecimal text for some characters
+ * **Fixed** `3196 `_: Remove text not working in 1.23.25 version vs 1.20.2
+ * **Fixed** `3172 `_: PDF's 45º lines dissapearing in png conversion
+ * **Fixed** `3135 `_: Do not log warnings to stdout
+ * **Fixed** `3125 `_: get_pixmap method stuck on one page and runs forever
+ * **Fixed** `2964 `_: There is an issue with the image generated by the page.get_pixmap() function
+
+* Other:
+
+ * Use MuPDF-1.24.0.
+ * Add support for redacting vector graphics.
+ * Several fixes for table module
+
+ * Add new method for outputting the table as a markdown string.
+
+ * Address errors in computing the table header object:
+
+ We now allow None as the cell value, because this will be resolved where
+ needed (e.g. in the pandas DataFrame).
+
+ We previously tried to enforce rect-like tuples in all header cell
+ bboxes, however this fails for tables with all-None columns. This fix
+ enables this and constructs an empty string in the corresponding cell
+ string.
+
+ We now correctly include start / stop points of lines in the bbox of the
+ clustered graphic. We previously joined the line's rectangle - which had
+ no effect because this is always empty.
+
+ * Improved exception text if we fail to open document.
+ * Fixed build with new libclang 18.
+
+
+**Changes in version 1.23.26 (2024-02-29)**
+
+* Fixed issues:
+
+ * **Fixed** `3199 `_: Add entry_points to setuptools configuration to provide command-line console scripts
+ * **Fixed** `3209 `_: Empty vertices in ink annotation
+
+* Other:
+
+ * Improvements to table detection:
+
+ * Improved check for empty tables, fixes bugs when determining table headers.
+ * Improved computation of enveloping vector graphic rectangles.
+ * Ignore more meaningless "pseudo" tables
+
+ * Install command-line 'pymupdf' command that runs fitz/__main__.py.
+ * Don't overwrite MuPDF's config.h when building on non-Windows.
+ * Fix `Story` constructor's `archive` arg to match docs - now accepts a single `Archive` constructor arg.
+ * Do not include MuPDF source in sdist; will be downloaded automatically when building.
+
+
+**Changes in version 1.23.25 (2024-02-20)**
+
+* Fixed issues:
+
+ * **Fixed** `3182 `_: Pixmap.invert_irect argument type error
+ * **Fixed** `3186 `_: extractText() extracts broken text from pdf
+ * **Fixed** `3191 `_: Error on .find_tables()
+
+* Other:
+
+ * When building, be able to specify python-config directly, with environment
+ variable `PIPCL_PYTHON_CONFIG`.
+
+
+**Changes in version 1.23.24 (2024-02-19)**
+
+* Fixed issues:
+
+ * **Fixed** `3148 `_: Table extraction - vertical text not handled correctly
+ * **Fixed** `3179 `_: Table Detection: Incorrect Separation of Vector Graphics Clusters
+ * **Fixed** `3180 `_: Cannot show optional content group: AttributeError: module 'fitz.mupdf' has no attribute 'pdf_array_push_drop'
+
+* Other:
+
+ * Be able to test system install using `sudo pip install` instead of a venv.
+
+
+**Changes in version 1.23.23 (2024-02-18)**
+
+* Fixed issues:
+
+ * **Fixed** `3126 `_: Initialising Archive with a pathlib.Path fails.
+ * **Fixed** `3131 `_: Calling the next attribute of an Annot raises a "No attribute .parent" warning
+ * **Fixed** `3134 `_: Using an IRect as clip parameter in Page.get_pixmap no longer works since 1.23.9
+ * **Fixed** `3140 `_: PDF document stays in use after closing
+ * **Fixed** `3150 `_: doc.select() hangs on this doc.
+ * **Fixed** `3163 `_: AssertionError on using fitz.IRect
+ * **Fixed** `3177 `_: fitz.Pixmap(None, pix) Unrecognised args for constructing Pixmap
+
+* Other:
+
+ *
+ Improved `Document.select() by using new MuPDF function
+ `pdf_rearrange_pages()`. This is a more complete (and faster)
+ implementation of what needs to be done here in that not only pages will
+ be rearranged, but also consequential changes will be made to the table
+ of contents, links to removed pages and affected entries in the Optional
+ Content definitions.
+ * `TextWriter.appendv()`: added `small_caps` arg.
+ * Fixed some valgrind errors with MuPDF master.
+ * Fixed `Document.insert_image()` when build with MuPDF master.
+
+
+**Changes in version 1.23.22 (2024-02-12)**
+
+* Fixed issues:
+
+ * **Fixed** `3143 `_: Difference in decoding of OCGs names between doc.get_ocgs() and page.get_drawings()
+
+ * **Fixed** `3139 `_: Pixmap resizing needs positional arg "clip" - even if None.
+
+* Other:
+
+ * Removed the use of MuPDF function `fz_image_size()` from PyMuPDF.
+
+
+**Changes in version 1.23.21 (2024-02-01)**
+
+* Fixed issues:
+
+* Other:
+
+ * Fixed bug in set_xml_metadata(), PR `3112 https://github.com/pymupdf/PyMuPDF/pull/3112>`_: Fix pdf_add_stream metadata error
+ * Fixed lack of `.parent` member in `TextPage` from `Annot.get_textpage()`.
+ * Fixed bug in `Page.add_widget()`.
+
+
+**Changes in version 1.23.20 (2024-01-29)**
+
+* Bug fixes:
+
+ * **Fixed** `3100 `_: Wrong internal property accessed in get_xml_metadata
+
+* Other:
+
+ * Significantly improved speed of `Document.get_toc()`.
+
+
+**Changes in version 1.23.19 (2024-01-25)**
+
+* Bug fixes:
+
+ * **Fixed** `3087 `_: Exception in insert_image with mask specified
+ * **Fixed** `3094 `_: TypeError: '<' not supported between instances of 'FzLocation' and 'int' in doc.delete_pages
+
+* Other:
+
+ * When finding tables:
+
+ * Allow addition of user-defined "virtual" vector graphics when finding tables.
+ * Confirm that the enveloping bboxes of vector graphics are inside the clip rectangle.
+ * Avoid slow finding of rectangle intersections.
+
+ * Added `Font.bbox` property.
+
+
+**Changes in version 1.23.18 (2024-01-23)**
+
+* Bug fixes:
+
+ * **Fixed** `3081 `_: doc.close() not closing the document
+
+* Other:
+
+ * Reduced size of sdist to fit on pypi.org (by reducing size of two test files).
+ * Fix `Annot.file_info()` if no `Desc` item.
+
+
+**Changes in version 1.23.17 (2024-01-22)**
+
+* Bug fixes:
+
+ * **Fixed** `3062 `_: page_rotation_reset does not return page to original rotation
+ * **Fixed** `3070 `_: update_link(): AttributeError: 'Page' object has no attribute 'super'
+
+* Other:
+
+ * Fixed bug in `Page.links()` (PR #3075).
+ * Fixed bug in `Page.get_bboxlog()` with layers.
+ * Add support for timeouts in scripts/ and tests/run_compound.py.
+
+
+**Changes in version 1.23.16 (2024-01-18)**
+
+* Bug fixes:
+
+ * **Fixed** `3058 `_: Pixmap created from CMYK JPEG delivers RGB format
+
+* Other:
+
+ * In table detection strategy "lines_strict", exclude fill-only vector graphics.
+ * Fixed sysinstall test failure.
+ * In documentation, update feature matrix with item about text writing.
+
+
+**Changes in version 1.23.15 (2024-01-16)**
+
+* Bug fixes:
+
+ * **Fixed** `3050 `_: python3.9 pix.set_pixel has something wrong in c.append( ord(i))
+
+* Other:
+
+ * Improved docs for Page.find_tables().
+
+
+**Changes in version 1.23.14 (2024-01-15)**
+
+* Bug fixes:
+
+ * **Fixed** `3038 `_: JM_pixmap_from_display_list > Assertion Error : Checking for wrong type
+ * **Fixed** `3039 `_: Issue with doc.close() not closing the document in PyMuPDF
+
+* Other:
+
+ * Ensure valid "re" rectangles in `Page.get_drawings()` with derotated pages.
+
+
+**Changes in version 1.23.13 (2024-01-15)**
+
+* Bug fixes:
+
+ * **Fixed** `2979 `_: list index out of range in to_pandas()
+ * **Fixed** `3001 `_: Calling find_tables() on one document alters the bounding boxes of a subsequent document
+
+* Other:
+
+ * Fixed `Rect.height` and `Rect.width` to never return negative values.
+ * Fixed `TextPage.extractIMGINFO()`'s returned `dictkey_yres` value.
+
+
+**Changes in version 1.23.12 (2024-01-12)**
+
+* * **Fixed** `3027 `_: Page.get_text throws Attribute Error for 'parent'
+
+
+**Changes in version 1.23.11 (2024-01-12)**
+
+* Fixed some Pixmap construction bugs.
+* Fixed Pixmap.yres().
+
+
+**Changes in version 1.23.10 (2024-01-12)**
+
+* Bug fixes:
+
+ * **Fixed** `3020 `_: Can't resize a PixMap
+
+* Other:
+
+ * Fixed Page.delete_image().
+
+
+**Changes in version 1.23.9 (2024-01-11)**
+
+* Default to new "rebased" implementation.
+
+ * The old "classic" implementation is available with `import fitz_old as fitz`.
+ * For more information about why we are changing to the rebased implementation,
+ see: https://github.com/pymupdf/PyMuPDF/discussions/2680
+
+* Use MuPDF-1.23.9.
+
+* Bug fixes (rebased implementation only):
+
+ * **Fixed** `2911 `_: Page.derotation_matrix returns a tuple instead of a Matrix with rebased implementation
+ * **Fixed** `2919 `_: Rebased version: KeyError in resolve_names when merging pdfs
+ * **Fixed** `2922 `_: New feature that allows inserting named-destination links doesn't work
+ * **Fixed** `2943 `_: ZeroDivisionError: float division by zero when use apply_redactions()
+ * **Fixed** `2950 `_: Shelling out to pip during tests is problematic
+ * **Fixed** `2954 `_: Replacement unicode character in text extraction
+ * **Fixed** `2957 `_: apply_redactions() moving text
+ * **Fixed** `2961 `_: Passing a string as a page number raises IndexError instead of TypeError.
+ * **Fixed** `2969 `_: annot.next throws AttributeError
+ * **Fixed** `2978 `_: 1.23.9rc1: module 'fitz.mupdf' has no attribute 'fz_copy_pixmap_rect'
+
+ * **Fixed** `2907 `_: segfault trying to call clean_contents on certain pdfs with python 3.12
+ * **Fixed** `2905 `_: SystemError: returned a result with an exception set
+ * **Fixed** `2742 `_: Segmentation Fault when inserting three (but not two) copies of the same source page into one destination page
+
+* Other:
+
+ * Add optional setting of opacity to `Page.insert_htmlbox()`.
+ * Fixed issue with add_redact_annot() mentioned in #2934.
+ * Fixed `Page.rotation()` to return 0 for non-PDF documents instead of raising an exception.
+ * Fixed internal quad detection to cope with any Python sequence.
+ * Fixed rebased `fitz.pymupdf_version_tuple` - was previously set to mupdf version.
+ * Improved support for Linux system installs, including adding regular testing on Github.
+ * Add missing `flake8` to `scripts/gh_release.py:test_packages`.
+ * Use newly public functions in MuPDF-1.23.8.
+ * Improved `scripts/test.py` to help investigation of MuPDF issues.
+
+
+**Changes in version 1.23.8 (2023-12-19)**
+
+* Bug fixes (rebased implementation only):
+
+ * **Fixed** `2634 `_: get_toc and set_toc do not behave consistently for rotated pages
+ * **Fixed** `2861 `_: AttributeError in getLinkDict during PDF Merge
+ * **Fixed** `2871 `_: KeyError in getLinkDict during PDF merge
+ * **Fixed** `2886 `_: Error in Skeleton for Named Link Destinations
+
+* Bug fixes (rebased and classic implementations):
+
+ * **Fixed** `2885 `_: pymupdf find tables too slow
+
+* Other:
+
+ * Rebased implementation:
+
+ * `Page.insert_htmlbox()`: new, much more powerful alternative to `Page.insert_textbox()` or `TextWriter.fill_textbox()`, using `Story`.
+ * `Story.fit*()`: new methods for fitting a Story into an expanded rect.
+ * `Story.write_with_links()`: add support for external links.
+ * `Document.language()`: fixed to use MuPDF's new `mupdf.fz_string_from_text_language2()`.
+ * `Document.subset_fonts()` - fixed.
+ * Fixed internal `Archive._add_treeitem()` method.
+ * Fixed `fitz_new.__doc__` to contain PyMuPDF and Python version information, and OS name.
+ * Removed use of `(*args, **kwargs)` in API, we now specify keyword args explicitly.
+ * Work with new MuPDF Python exception classes.
+
+ * Fixed bug where `button_states()` returns None when `/AP` points to an indirect object.
+ * Fixed pillow test to not ignore all errors, and install pillow when testing.
+ * Added test for `fitz.css_for_pymupdf_font()` (uses package `pymupdf-fonts`).
+ * Simplified Github Actions test specifications.
+ * Updated `tests/README.md`.
+
+
+**Changes in version 1.23.7 (2023-11-30)**
+
+* Bug fixes in rebased implementation, not fixed in classic implementation:
+
+ * **Fixed** `2232 `_: Geometry helper classes should support keyword arguments
+ * **Fixed** `2788 `_: Problem with get_toc in pymupdf 1.23.6
+ * **Fixed** `2791 `_: Experiencing small memory leak in save()
+
+* Bug fixes (rebased and classic implementations):
+
+ * **Fixed** `2736 `_: Failure when set cropbox with mediabox negative value
+ * **Fixed** `2749 `_: RuntimeError: cycle in structure tree
+ * **Fixed** `2753 `_: Story.write_with_links will ignore everything after the first "page break" in the HTML.
+ * **Fixed** `2812 `_: find_tables on landscape page generates reversed text
+ * **Fixed** `2829 `_: [cannot create /Annot for kind] is still printed despite #2345 is closed.
+ * **Fixed** `2841 `_: Unexpected KeyError when using scrub with fitz_new
+
+* Use MuPDF-1.23.7.
+
+* Other:
+
+ * Rebased implementation:
+
+ * Added flake8 code checking to test suite, and made various fixes.
+ * Disable diagnostics during Document constructor to match classic implementation.
+
+ * Additional fix to `2553 `_: Invalid characters in versions >= 1.22
+ * Fixed `MuPDF Bug 707324 `_: Story: HTML table row background color repeated incorrectly
+ * Added `scripts/test.py`, for simple build+test of PyMuPDF git checkout.
+ * Added `fitz.pymupdf_version_tuple`, e.g. `(1, 23, 6)`.
+ * Restored mistakenly-reverted fix for `2345 `_: Turn off print statements in utils.py
+ * Include any trailing `... repeated times...` text in warnings returned by `mupdf_warnings()` (rebased only).
+
+
+
+**Changes in version 1.23.6 (2023-11-06)**
+
+* Bug fixes:
+
+ * **Fixed** `2553 `_: Invalid characters in versions >= 1.22
+ * **Fixed** `2608 `_: Incorrect utf32 text extraction (high & low surrogates are split)
+ * **Fixed** `2710 `_: page.rect and text location wrong / differing from older version
+ * **Fixed** `2774 `_: wrong encoding for "\?" character when sort=True
+ * **Fixed** `2775 `_: fitz_new does not work with python3.10 or earlier
+ * **Fixed** `2777 `_: With fitz_new, wrong type for Page.mediabox
+
+* Other:
+
+ * Use MuPDF-1.23.5.
+ * Added Document.resolve_names() (rebased implementation only).
+
+
+**Changes in version 1.23.5 (2023-10-11)**
+
+* Bug fixes:
+
+ * **Fixed** `2341 `_: Handling negative values in the zoom section for LINK_GOTO in linkDest
+ * **Fixed** `2522 `_: Typo in set_layer() - NameError: name 'f' is not defined
+ * **Fixed** `2548 `_: Fitz freezes on some PDFs when calling the fitz.Page.get_text_blocks method.
+ * **Fixed** `2596 `_: save(garbage=3) breaks get_pixmap() with side effect
+ * **Fixed** `2635 `_: "clean=True" makes objects invisible in the pdf
+ * **Fixed** `2637 `_: Page.insert_textbox incorrectly handles the last word if it starts a new line
+ * **Fixed** `2699 `_: extract paragraph with below table
+ * **Fixed** `2703 `_: Wrong fontsize calculation in corner cases ("page.get_texttrace()")
+ * **Fixed** `2710 `_: page.rect and text location wrong / differing from older version
+ * **Fixed** `2723 `_: When will a Python 3.12 wheel be available?
+ * **Fixed** `2730 `_: persistent get_text() formatting
+
+* Other:
+
+ * Use MuPDF-1.23.4.
+ * Fix optimisation flags with system installs.
+ * Fixed the problem that the clip parameter does not take effect during table recognition
+ * Support Pillow mode "RGBa"
+ * Support extra word delimiters
+ * Support checking valid PDF name objects
+
+
+**Changes in version 1.23.4 (2023-09-26)**
+
+* Improved build instructions.
+* Fixed Tesseract in rebased implementation.
+* Improvements to build/install with system MuPDF.
+* Fixed Pyodide builds.
+* Fixed rebased bug in _insert_image().
+
+* Bug fixes:
+
+ * **Fixed** `2556 `_: Segmentation fault at caling get_cdrawings(extended=True)
+ * **Fixed** `2637 `_: Page.insert_textbox incorrectly handles the last word if it starts a new line
+ * **Fixed** `2683 `_: Windows sdist build failure - non-quoting of path and using UNIX which command
+ * **Fixed** `2691 `_: Page.get_textpage_ocr() bug in rebased fitz_new version
+ * **Fixed** `2692 `_: Page.get_pixmap(clip=Rect()) bug in rebased fitz_new version
+
+
+**Changes in version 1.23.3 (2023-08-31)**
+
+* Fixed use of Tesseract for OCR.
+
+
+**Changes in version 1.23.2 (2023-08-28)**
+
+* **Fixed** `#2613 `_: release 1.23.0 not MacOS-arm64 compatible
+
+
+**Changes in version 1.23.1 (2023-08-24)**
+
+* Updated README and package summary description.
+
+*
+ Fixed a problem on some Linux installations with Python-3.10
+ (and possibly earlier versions) where `import fitz` failed with
+ `ImportError: libcrypt.so.2: cannot open shared object file: No such
+ file or directory`.
+
+*
+ Fixed `incompatible architecture` error on MacOS arm64.
+
+*
+ Fixed installation warning from Poetry about missing entry in wheels'
+ RECORD files.
+
+
+**Changes in version 1.23.0 (2023-08-22)**
+
+* Add method `find_tables()` to the `Page` object.
+
+ This allows locating tables on any supported document page, and
+ extracting table content by cell.
+
+* New "rebased" implementation of PyMuPDF.
+
+ The rebased implementation is available as Python module
+ `fitz_new`. It can be used as a drop-in replacement with `import
+ fitz_new as fitz`.
+
+*
+ Python-independent MuPDF libraries are now in a second wheel called
+ `PyMuPDFb` that will be automatically installed by pip.
+
+ This is to save space on pypi.org - a full release only needs one
+ `PyMuPDFb` wheel for each OS.
+
+* Bug fixes:
+
+ * **Fixed** `#2542 `_: fitz.utils.scrub AttributeError Annot object has no attribute fileUpd inside
+ * **Fixed** `#2533 `_: get_texttrace returned a incorrect character bbox
+ * **Fixed** `#2537 `_: Validation when setting a grouped RadioButton throws a RuntimeError: path to 'V' has indirects
+
+* Other changes:
+
+ * Dropped support for Python-3.7.
+
+ * Fix for wrong page / annot `/Contents` cleaning.
+
+ We need to set `pdf_filter_options::no_update` to zero.
+
+ * Added new function get_tessdata().
+
+ * Cope with problem `/Annot` arrays.
+
+ When copying page annotations in method Document.insert_pdf we
+ previously did not check the validity of members of the `/Annots`
+ array. For faulty members (like null or non-dictionary items) this
+ could cause unnecessary exceptions. This fix implements more checks
+ and skips such array items.
+
+ * Additional annotation type checks.
+
+ We did not previously check for annotation type when getting /
+ setting annotation border properties. This is now checked in
+ accordance with MuPDF.
+
+ * Increase fault tolerance.
+
+ Avoid exceptions in method `insert_pdf()` when source pages contains
+ invalid items in the `/Annots` array.
+
+ * Return empty border dict for applicable annots.
+
+ We previously were returning a non-empty border dictionary even for
+ non-applicable annotation types. We now return the empty dictionary
+ `{}` in these cases. This requires some corresponding changes in the
+ annotation `.update()` method, namely for dashes and border width.
+
+ * Restrict `set_rect` to applicable annot types.
+
+ We were insufficiently excluding non-applicable annotation types
+ from `set_rect()` method. We now let MuPDF catch unsupported
+ annotations and return `False` in these cases.
+
+ * Wrong fontsize computation in `page.get_texttrace()`.
+
+ When computing the font size we were using the final text
+ transformation matrix, where we should have taken `span->trm`
+ instead. This is corrected here.
+
+ * Updates to cope with changes to latest MuPDF.
+
+ `pdf_lookup_anchor()` has been removed.
+
+ * Update fill_textbox to better respect rect.width
+
+ The function norm_words in fill_textbox had a bug in its last
+ loop, appending n+1 characters when actually measuring width of n
+ characters. It led to a bug in fill_texbox when you tried to write
+ a single word mostly composed of "wide" letters (M,m, W, w...),
+ causing the written text to exceed the given rect.
+
+ The fix was just to replace n+1 by n.
+
+ * Add `script_focus` and `script_blur` options to widget.
+
+
+
+**Changes in version 1.22.5 (2023-06-21)**
+
+* This release uses ``MuPDF-1.22.2``.
+
+* Bug fixes:
+
+ * **Fixed** `#2365 `_: Incorrect dictionary values for type "fs" drawings.
+ * **Fixed** `#2391 `_: Check box automatically uncheck when we update same checkbox more than 1 times.
+ * **Fixed** `#2400 `_: Gaps within text of same line not filled with spaces.
+ * **Fixed** `#2404 `_: Blacklining an image in PDF won't remove underlying content in version 1.22.X.
+ * **Fixed** `#2430 `_: Incorrectly reducing ref count of Py_None.
+ * **Fixed** `#2450 `_: Empty fill color and fill opacity for paths with fill and stroke operations with 1.22.*
+ * **Fixed** `#2462