NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
PyPI · #296 most downloaded on PyPI
A high performance Python library for data extraction, analysis, conversion & manipulation of PDF (and other) documents.
Last release 1 months ago
06 Aug 2026
Ships fairly regularly
a new release about every 5 weeks
Nearly every release is documented
notes for 60 of the last 60 stable releases
1 version withdrawn
withdrawn after publishing
9 years old
138 releases · first in 2017
Wheels for Windows, Linux and MacOS, and the sdist, are available on https://pypi.org and can be installed in the usual way, for example:
Wheels for Windows, Linux and MacOS, and the sdist, are available on
https://pypi.org and can be installed in the usual way, for example:
python -m pip install --upgrade pymupdf
Changes in version 1.28.2 ()
Fixed issues:
Other:
fitz module is imported.use_layout: bool = True union: bool = False refine: bool = False.One column per quarter.
Fixed issues:
Fixed 4670 : scrub fails to remove hidden text after clean_contents stopped including line breaks (u2265 1.24.0)
Fixed 4943 : enh: applying redactions with image cropping for currently unsupported colorspaces
Fixed 5030 : find_tables() with layout enabled can return a zero-cell Table, and Table.bbox then raises “ValueError: min() iterable argument is empty”
Fixed 5042 : Page.get_texttrace() leaks None references u2014 Fatal Python error (none_dealloc) in long-running processes (1.27.2.3 & 1.28.0)
Fixed 5044 : Outline (TOC) parsing bug
Fixed 5049 : font subsetting segfaults in 1.28.0, regression from 1.27.2.2 #5049
Fixed 5056 : Option for reproducible/deterministic save output (omit MuPDF version banner + Producer)
Other:
Use MuPDF-1.28.2.
Output warning when legacy fitz module is imported.
Cope better with markdown containing illegal utf8 sequences.
Fixed building with PYMUPDF_SETUP_MUPDF_VS_UPGRADE.
pymupdf.Page.find_tables():
Retrospectively added fix for #4936 in release 1.28.0 below.
Added windows-arm64 wheel.
Wheels for Windows, Linux and MacOS, and the sdist, are available on https://pypi.org and can be installed in the usual way, for example:
Wheels for Windows, Linux and MacOS, and the sdist, are available on
https://pypi.org and can be installed in the usual way, for example:
python -m pip install --upgrade pymupdf
Changes in version 1.28.0
Fixed issues:
Other:
archive to support documents with archives.Fixed issues:
Fixed 4114 : ComboBox choice_values full of empty strings despite PDF having valid choices.
Fixed 4950 : remove_rotation() raises ValueError on widgets with empty/infinite rects
Fixed 5001 : Formulae incorrectly rendered as black boxes
Fixed 5033 : Annot.set_rotation(0) followed by Annot.update() throws AttributeError
Fixed 4936 : bug: incomplete redaction of vector graphics (line art)
Other:
Use MuPDF-1.28.0.
pymupdf.Document.init(): new arg Archive to support documents with archives.
pymupdf.Document.convert_to_pdf(): also generate links.
Fixed MacOS x64 platform tag - used to be macosx_10_9_x86_64, but we actually require MacOS 10.15, so platform tag is now macosx_10_15_x86_64.
Support Windows builds with free thread python.
pymupdf.Document.save() now saves non-PDF documents in PDF format.
New method pymupdf.Document.apply_css().
Pyodide wheel is available on pypi.org.
Wheels for Windows, Linux and MacOS, and the sdist, are available on https://pypi.org and can be installed in the usual way, for example:
Wheels for Windows, Linux and MacOS, and the sdist, are available on
https://pypi.org and can be installed in the usual way, for example:
python -m pip install --upgrade pymupdf
Changes in version 1.27.2.3
Fixed issues:
Other:
lineJoin j in PDF content, introduced in 1.27.2.2.Fixed issues:
Fixed 4928 : pymupdf.Document.scrub raises AttributeError for a document with annotations
Fixed 4942 : bug: IndexError for Page.get_links after Page.clip_to_rect
Fixed 4954 : get_drawings() returns incorrect lineJoin and width
Fixed 4958 : bug: inserting rotated pages to another document messes up link coordinates
Other:
Fixed incorrect generation of lineJoin j in PDF content, introduced in 1.27.2.2.
Allow build to (incorrectly) claim to be thread-safe, for #4760. See setup.py for details.
Use pypi.org’s pipcl package instead of our own pipcl.py file.
Wheels for Windows, Linux and MacOS, and the sdist, are available on https://pypi.org and can be installed in the usual way, for example:
Wheels for Windows, Linux and MacOS, and the sdist, are available on
https://pypi.org and can be installed in the usual way, for example:
python -m pip install --upgrade pymupdf
Changes in version 1.27.2.2
Fixed issues:
Fixed 4902 : Incorrect linewidth in elements returned by Page.get_texttrace()
Fixed 4932 : “Page” has no attribute “find_tables” in PyMuPDF 1.27
Other:
Added Annot.bool() .
Wheels for Windows, Linux and MacOS, and the sdist, are available on https://pypi.org and can be installed in the usual way, for example:
Wheels for Windows, Linux and MacOS, and the sdist, are available on https://pypi.org and can be installed in the usual way, for example:
python -m pip install --upgrade pymupdf
Changes in version 1.27.2
Use MuPDF-1.27.2.
Fixed issues:
Other:
Retrospectively marked #4907 as fixed in pymupdf-1.27.1.
Improved get_textpage_ocr().
For partial OCR, all page areas outside legible text are now OCRed, not
just those within images. This means that OCR will now also be performed
for vector graphics, and for text containing illegible characters.
Use MuPDF-1.27.2.
Fixed issues:
Fixed 4903 : Typing broken because of *_forward_decl
Fixed 3842 : Partial OCR using “get_textpage_ocr” ignores image masks while extracting text
Other:
Retrospectively marked #4907 as fixed in pymupdf-1.27.1.
Improved get_textpage_ocr() .
For partial OCR, all page areas outside legible text are now OCRed, not just those within images. This means that OCR will now also be performed for vector graphics, and for text containing illegible characters.
Provide a Linux wheel for free-threading python, specifically cp314-cp314t-manylinux_2_28_x86_64.
Wheels for Windows, Linux and MacOS, and the sdist, are available on https://pypi.org and can be installed in the usual way, for example:
Wheels for Windows, Linux and MacOS, and the sdist, are available on
https://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.27.1 (2026-02-11)
Use MuPDF-1.27.1.
Fixed issues:
Fixed 4599 : page.cluster_drawings extract a lot of small clusters once upgraded to 1.26
Fixed 4751 : Memory leaking in page.widgets()
Fixed 4762 : Importing pymupdf make pillow segmentation fault for converting jp2 file on ArchLinux
Fixed 4790 : Problem to delete pages on PDF
Fixed 4857 : Package is missing py.typed file required for type checking
Fixed 4886 : <IMG> width attribute behaviour seems wrong
Fixed 4907 : signal 11:SIGSEGV while using display_list.get_textpage()
Other:
Added pymupdf.TEXT_CLIP .
Removed support for mupdf < 1.26.
New arg raise_on_repair in Document.save() .
New method Document.repair() .
Wheels for Windows, Linux and MacOS, and the sdist, are available on pypi.org and can be installed in the usual way, for example:
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.26.7
Other:
pymupdf embed-extract. This now refuses to write to-output or new flag-unsafe is specified.Use MuPDF-1.26.12.
Fixed 4801 : Build failure dumping all environment variables
Other:
Retrospectively mark 4756 as fixed in 1.26.6.
Improved safety of pymupdf embed-extract . This now refuses to write to an existing file or outside current directory, unless -output or new flag -unsafe is specified.
Wheels for Windows, Linux and MacOS, and the sdist, are available on pypi.org and can be installed in the usual way, for example:
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.26.6
Use MuPDF-1.26.11.
Supported Python versions are now 3.10-3.14.
Fixed issues:
Fixed 4699 : cannot find ExtGState resource
Fixed 4712 : Crash with “corrupted double-linked list”
Fixed 4720 : Memory leaking in rewrite_images?
Fixed 4742 : ‘Rect’ object has no attribute ‘get_area’
Fixed 4746 : Document.init() got an unexpected keyword argument ‘encoding’
Fixed 4756 : swig –version doesn’t work in all versions of swig; -version should be used instead
Wheels for Windows, Linux and MacOS, and the sdist, are available on pypi.org and can be installed in the usual way, for example:
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.26.5
Use MuPDF-1.26.10.
Fixed issues:
Other:
pymupdf.utils.Shape class, was duplicate of pymupdf.Shape.4544 <https://github.com/pymupdf/PyMuPDF/issues/4544>_ as fixed in 1.26.4.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 <filetype> arg.
Retrospectively mark 4544 as fixed in 1.26.4.
Wheels for Windows, Linux and MacOS, and the sdist, are available on pypi.org and can be installed in the usual way, for example:
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.26.4
Use MuPDF-1.26.7.
Fixed issues:
Other:
Segfault when running with pytest and -Werror is fixed if PyMuPDF is built with swig>=4.4.Page.clip_to_rect().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: <class ‘AttributeError’>: ‘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.
PyMuPDF-1.26.3 has been released.
PyMuPDF-1.26.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.26.3
Use MuPDF-1.26.3.
Fixed issues:
Other:
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.
PyMuPDF-1.26.1 has been released.
PyMuPDF-1.26.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.26.1
Use MuPDF-1.26.2.
Fixed issues:
Other:
Document.rewrite_images(), useful for reducing file size, changing image formats, or converting color spaces.Page.get_text(): restrict positional args to match docs.Shape.pymupdf.pymupdf_date and pymupdf.VersionDate are now both None.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-1.26.0 has been released.
PyMuPDF-1.26.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.26.0 (2025-05-22)
Use MuPDF-1.26.1.
Fixed issues:
Other:
4390 <https://github.com/pymupdf/PyMuPDF/issues/4390>_).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.
PyMuPDF-1.25.5 has been released.
PyMuPDF-1.25.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
[Linux-aarch64 wheels will be built and uploaded later.]
Changes in version 1.25.5 (2025-03-31)
Fixed issues:
Other:
Annot.get_textpage()'s clip arg.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.
PyMuPDF-1.25.4 has been released.
PyMuPDF-1.25.4 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.25.4 (2025-03-14)
Fixed issues:
Other:
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.
PyMuPDF-1.25.3 has been released.
PyMuPDF-1.25.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.25.3 (2025-02-06)
Use MuPDF-1.25.4.
Fixed issues:
Other:
Document.insert_pdf().bibi to span dicts.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 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.
PyMuPDF-1.25.2 has been released.
PyMuPDF-1.25.2 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.25.2 (2025-01-17)
Fixed issues:
Other:
char_flags member to span dictionary, for example allows detection of invisible text.Pixmap.pil_image().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() .
PyMuPDF-1.25.1 has been released.
PyMuPDF-1.25.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.25.1 (2024-12-11)
Use MuPDF-1.25.2.
Fixed issues:
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.
PyMuPDF-1.25.0 has been released.
PyMuPDF-1.25.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.25.0 (2024-12-05)
Use MuPDF-1.25.1.
Fixed issues:
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
PyMuPDF-1.24.14 has been released.
PyMuPDF-1.24.14 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.14 (2024-11-19)
Use MuPDF-1.24.11.
Fixed issues:
Other:
Page.get_text() never contain RTL/LTR char mixtures.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.
PyMuPDF-1.24.13 has been released.
PyMuPDF-1.24.13 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.13 (2024-10-29)
Fixed issues:
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)
PyMuPDF-1.24.12 has been released.
PyMuPDF-1.24.12 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.12 (2024-10-21)
Fixed issues:
Supported Python versions are now 3.9-3.13.
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/
PyMuPDF-1.24.11 has been released.
PyMuPDF-1.24.11 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.11 (2024-10-03)
Use MuPDF-1.24.10.
Fixed issues:
Wheels now use the Python Stable ABI:
Other:
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.
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.7 has been released.
PyMuPDF-1.24.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 will be built and uploaded later.]
Changes in version 1.24.7 (2024-06-26)
Fixed issues:
Fixed issues:
Fixed 3615 : Document.pagemode or Document.pagelayout crashes for epub files
Fixed 3616 : not last version reported
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.5 has been released.
PyMuPDF-1.24.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
[Linux-aarch64 wheels will be built and uploaded later.]
Changes in version 1.24.5 (2024-05-30)
Fixed issues:
Other:
pymupdf.apply_pages() and pymupdf.get_text().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”.
PyMuPDF-1.24.4 has been released.
PyMuPDF-1.24.4 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.4 (2024-05-16)
Fixed #3418
Other:
utils.do_links() crash.TextPage creation Code.page_merge().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() .
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.2 has been released.
PyMuPDF-1.24.2 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.2 (2024-04-17)
Removed obsolete classic implementation from releases
(previously available as module fitz_old).
Fixed issues:
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.
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.
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.26 has been released.
PyMuPDF-1.23.26 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.26 (2024-02-29)
Fixed issues:
Other:
Improvements to table detection:
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.
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.
PyMuPDF-1.23.25 has been released.
PyMuPDF-1.23.25 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.25 (2024-02-20)
Fixed issues:
Other:
PIPCL_PYTHON_CONFIG.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 .
PyMuPDF-1.23.24 has been released.
PyMuPDF-1.23.24 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.24 (2024-02-19)
Fixed issues:
Other:
sudo pip install instead of a venv.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.
PyMuPDF-1.23.23 has been released.
PyMuPDF-1.23.23 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.23 (2024-02-18)
Fixed issues:
Other:
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.Document.insert_image() when build with MuPDF master.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.
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.21 has been released.
PyMuPDF-1.23.21 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.21 (2024-02-01)
Fixed issues:
Other:
.parent member in TextPage from Annot.get_textpage().Page.add_widget().Fixed issues:
Other:
Fixed bug in set_xml_metadata(), PR 3112 : Fix pdf_add_stream metadata error
Fixed lack of .parent member in TextPage from Annot.get_textpage() .
Fixed bug in Page.add_widget() .
PyMuPDF-1.23.20 has been released.
PyMuPDF-1.23.20 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.20 (2024-01-29)
Bug fixes:
Other:
Document.get_toc().Bug fixes:
Fixed 3100 : Wrong internal property accessed in get_xml_metadata
Other:
Significantly improved speed of Document.get_toc() .
PyMuPDF-1.23.19 has been released.
PyMuPDF-1.23.19 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.19 (2024-01-25)
Bug fixes:
Other:
When finding tables:
Added Font.bbox property.
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.
PyMuPDF-1.23.18 has been released.
PyMuPDF-1.23.18 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.18 (2024-01-23)
Bug fixes:
Other:
Annot.file_info() if no Desc item.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.
PyMuPDF-1.23.17 has been released.
PyMuPDF-1.23.17 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.17 (2024-01-22)
Bug fixes:
Other:
Page.links() (PR #3075).Page.get_bboxlog() with layers.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.
PyMuPDF-1.23.16 has been released.
PyMuPDF-1.23.16 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.16 (2024-01-18)
Bug fixes:
Other:
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.
PyMuPDF-1.23.15 has been released.
PyMuPDF-1.23.15 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.15 (2024-01-16)
Bug fixes:
Other:
Bug fixes:
Fixed 3050 : python3.9 pix.set_pixel has something wrong in c.append( ord(i))
Other:
Improved docs for Page.find_tables().
PyMuPDF-1.23.14 has been released.
PyMuPDF-1.23.14 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.14 (2024-01-15)
Bug fixes:
Other:
Page.get_drawings() with derotated pages.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.
PyMuPDF-1.23.13 has been released.
PyMuPDF-1.23.13 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.13 (2024-01-15)
Bug fixes:
Other:
Rect.height and Rect.width to never return negative values.TextPage.extractIMGINFO()'s returned dictkey_yres value.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.
PyMuPDF-1.23.12 has been released.
PyMuPDF-1.23.12 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.12 (2024-01-12)
PyMuPDF-1.23.11 has been released.
PyMuPDF-1.23.11 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.11 (2024-01-12)
PyMuPDF-1.23.10 has been released.
PyMuPDF-1.23.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 are not available yet, they will be build and uploaded later.]
Changes in version 1.23.10 (2024-01-12)
Bug fixes:
Other:
Bug fixes:
Fixed 3020 : Can’t resize a PixMap
Other:
Fixed Page.delete_image().
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.8 has been released.
PyMuPDF-1.23.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 are not available yet, they will be build and uploaded later.]
Changes in version 1.23.8 (2023-12-19)
Bug fixes (rebased implementation only):
Bug fixes (rebased and classic implementations):
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.Archive._add_treeitem() method.fitz_new.__doc__ to contain PyMuPDF and Python version information, and OS name.(*args, **kwargs) in API, we now specify keyword args explicitly.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.
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 .
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.4 has been released.
PyMuPDF-1.23.4 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.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:
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 calling 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
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)
Your coding agent can read these notes before it upgrades. Set up the MCP server →