NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
PyPI · #2881 most downloaded on PyPI
MuPDF shared libraries for PyMuPDF.
Last release 2 years ago
no release in 18 months
Ships fairly regularly
a new release about every 5 weeks
Nearly every release is documented
notes for 14 of 14 stable releases
Nothing withdrawn
no release was ever pulled
3 years old
18 releases · first in 2023
One column per quarter.
PyMuPDF-1.24.10 has been released.
PyMuPDF-1.24.10 has been released.
Wheels for Windows, Linux and MacOS, and the sdist, are available on pypi.org and can be installed in the usual way, for example:
python -m pip install --upgrade pymupdf
[Linux-aarch64 wheels will be built and uploaded later.]
Changes in version 1.24.10 (2024-09-02)
Use MuPDF-1.24.9.
Fixed issues:
Other:
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.
PyMuPDF-1.24.9 has been released.
PyMuPDF-1.24.9 has been released.
Wheels for Windows, Linux and MacOS, and the sdist, are available on pypi.org and can be installed in the usual way, for example:
python -m pip install --upgrade pymupdf
[Linux-aarch64 wheels will be built and uploaded later.]
Changes in version 1.24.9 (2024-07-24)
PyMuPDF-1.24.8 has been released.
PyMuPDF-1.24.8 has been released.
Wheels for Windows, Linux and MacOS, and the sdist, are available on pypi.org and can be installed in the usual way, for example:
python -m pip install --upgrade pymupdf
[Linux-aarch64 wheels will be built and uploaded later.]
Changes in version 1.24.8 (2024-07-22)
Fixed issues:
Other:
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.
PyMuPDF-1.24.6 has been released.
PyMuPDF-1.24.6 has been released.
Wheels for Windows, Linux and MacOS, and the sdist, are available on pypi.org and can be installed in the usual way, for example:
python -m pip install --upgrade pymupdf
[Linux-aarch64 wheels will be built and uploaded later.]
Changes in version 1.24.6 (2024-06-25)
Fixed issues:
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.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 .
PyMuPDF-1.24.3 has been released.
PyMuPDF-1.24.3 has been released.
Wheels for Windows, Linux and MacOS, and the sdist, are available on pypi.org and can be installed in the usual way, for example:
python -m pip install --upgrade pymupdf
[Linux-aarch64 wheels will be built and uploaded later.]
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:
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).
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”).
PyMuPDF-1.24.1 has been released.
PyMuPDF-1.24.1 has been released.
Wheels for Windows, Linux and MacOS, and the sdist, are available on pypi.org and can be installed in the usual way, for example:
python -m pip install --upgrade pymupdf
[Linux-aarch64 wheels will be built and uploaded later.]
Changes in version 1.24.1 (2024-04-02)
Fixed issues:
Other:
Document.save(), Document.ez_save() and Document.write()
now support new parameters use_objstm, compression_effortandpreserve_metadata`.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 .
PyMuPDF-1.24.0 has been released.
PyMuPDF-1.24.0 has been released.
Wheels for Windows, Linux and MacOS, and the sdist, are available on pypi.org and can be installed in the usual way, for example:
python -m pip install --upgrade pymupdf
[Linux-aarch64 wheels will be built and uploaded later.]
Changes in version 1.24.0 (2024-03-21)
Fixed issues:
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.
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 annotated 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 disappearing 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.
PyMuPDF-1.23.22 has been released.
PyMuPDF-1.23.22 has been released.
Wheels for Windows, Linux and MacOS, and the sdist, are available on pypi.org and can be installed in the usual way, for example:
python -m pip install --upgrade pymupdf
[Linux-aarch64 wheels will be built and uploaded later.]
Changes in version 1.23.22 (2024-02-12)
Fixed issues:
Fixed #3143
Fixed #3139
Other:
fz_image_size() from PyMuPDF.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.
PyMuPDF-1.23.9 has been released.
PyMuPDF-1.23.9 has been released.
Wheels for Windows, Linux and MacOS, and the sdist, are available on pypi.org and can be installed in the usual way, for example:
python -m pip install --upgrade pymupdf
[Linux-aarch64 wheels are not available yet, they will be build and uploaded later.]
Changes in version 1.23.9 (2024-01-11)
Default to new "rebased" implementation.
import fitz_old as fitz.Use MuPDF-1.23.9.
Bug fixes (rebased implementation only):
Other:
Page.insert_htmlbox().Page.rotation() to return 0 for non-PDF documents instead of raising an exception.fitz.pymupdf_version_tuple - was previously set to mupdf version.flake8 to scripts/gh_release.py:test_packages.scripts/test.py to help investigation of MuPDF issues.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: <built-in function TextPage_extractIMGINFO> 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.
PyMuPDF-1.23.9rc2 release candidate is available.
PyMuPDF-1.23.9rc2 release candidate is available.
Wheels for Windows, Linux and MacOS, and the sdist, are available on pypi.org and can be installed with:
python -m pip install pymupdf==1.23.9rc2
[Linux-aarch64 wheels are not available.]
Changes in version 1.23.9rc2 (2024-01-08)
Use MuPDF-1.23.8.
Bug fixes (rebased implementation only):
Other:
Page.insert_htmlbox().flake8 to scripts/gh_release.py:test_packages.PyMuPDF-1.23.9rc1 release candidate is available.
PyMuPDF-1.23.9rc1 release candidate is available.
Wheels for Windows, Linux and MacOS, and the sdist, are available on pypi.org and can be installed with:
python -m pip install pymupdf==1.23.9rc1
[Linux-aarch64 wheels are not available.]
Changes in version 1.23.9rc1 (2024-01-02)
Default to new "rebased" implementation.
import fitz_old as fitz.Bug fixes (rebased implementation only):
Other:
fitz.pymupdf_version_tuple - was previously set to mupdf version.scripts/test.py to help investigation of MuPDF issues.Page.rotation() to return 0 for non-PDF documents instead of raising an exception.PyMuPDF-1.23.7 has been released.
PyMuPDF-1.23.7 has been released.
Wheels for Windows, Linux and MacOS, and the sdist, are available on pypi.org and can be installed in the usual way, for example:
python -m pip install --upgrade pymupdf
[Linux-aarch64 wheels are not available yet, they will be build and uploaded later.]
Changes in version 1.23.7 (2023-11-30)
Bug fixes in rebased implementation, not fixed in classic implementation:
Bug fixes (rebased and classic implementations):
Use MuPDF-1.23.7.
Other:
Rebased implementation:
Additional fix to #2553
Fixed MuPDF Bug 707324 <https://bugs.ghostscript.com/show_bug.cgi?id=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.
Include any trailing ... repeated <N> times... text in warnings returned by mupdf_warnings() (rebased only).
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 <N> times... text in warnings returned by mupdf_warnings() (rebased only).
PyMuPDF-1.23.6 has been released.
PyMuPDF-1.23.6 has been released.
Wheels for Windows, Linux and MacOS, and the sdist, are available on pypi.org and can be installed in the usual way, for example:
python -m pip install --upgrade pymupdf
[Linux-aarch64 wheels are not available yet, they will be build and uploaded later.]
Changes in version 1.23.6 (2023-11-06)
Bug fixes:
Other:
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).
PyMuPDF-1.23.5 has been released.
PyMuPDF-1.23.5 has been released.
Wheels for Windows, Linux and MacOS, and the sdist, are available on pypi.org and can be installed in the usual way, for example:
python -m pip install --upgrade pymupdf
Changes in version 1.23.5 (2023-10-11)
Bug fixes:
Other:
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
PyMuPDF-1.23.3 has been released.
PyMuPDF-1.23.3 has been released.
Wheels for Windows, Linux and MacOS, and the sdist, are available on pypi.org and can be installed in the usual way, for example:
python -m pip install --upgrade pymupdf
Changes in version 1.23.3 (2023-08-31)
PyMuPDF-1.23.0 has been released.
PyMuPDF-1.23.0 has been released.
Wheels for Windows, Linux and MacOS, and the sdist, are available on pypi.org and can be installed in the usual way, for example:
python -m pip install --upgrade pymupdf
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:
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.
Nothing published for this version
Nothing published for this version
Your coding agent can read these notes before it upgrades. Set up the MCP server →