Releases: pymupdf/PyMuPDF
PyMuPDF-1.22.0 released
PyMuPDF-1.22.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.22.0 (2023-04-14)
-
This release uses
MuPDF-1.22.0. -
Behavioural changes:
- Text extraction now includes glyphs that overlap with clip rect; previously
they were included only if they were entirely contained within the clip
rect.
- Text extraction now includes glyphs that overlap with clip rect; previously
-
Bug fixes:
- Fixed #1763: Interactive(smartform) form PDF calculation not working in pymupdf
- Fixed #1995: RuntimeError: image is too high for a long paged pdf file when trying
- Fixed #2093: Image in pdf changes color after applying redactions
- Fixed #2108: Redaction removing more text than expected
- Fixed #2141: Failed to read JPX header when trying to get blocks
- Fixed #2144: Replace image throws an error
- Fixed #2146: Wrong Handling of Reference Count of "None" Object
- Fixed #2161: Support adding images as pages directly
- Fixed #2168:
page.add_highlight_annot(start=pointa, stop=pointb)not working - Fixed #2173: Double free of
Colorspaceused inPixmap - Fixed #2179: Incorrect documentation for
pixmap.tint_with() - Fixed #2208: Pushbutton widget appears as check box
- Fixed #2210:
apply_redactions()move pdf text to right after redaction - Fixed #2220:
Page.delete_image()| object has no attributeis_image - Fixed #2228: open some pdf cost too much time
- Fixed #2238: Bug - can not extract data from file in the newest version 1.21.1
- Fixed #2242: Python quits silently in
Story.element_positions()if callback function prototype is wrong - Fixed #2248: After redacting the content, the position of the remaining text changes
- Fixed #2250: docs: unclear or broken link in page.rst
- Fixed #2251: mupdf_display_errors does not apply to Pixmap when loading broken image
- Fixed #2270:
Annot.get_text("words")- doesn't return the first line of words - Fixed #2275: insert_image: document that rotations are counterclockwise
- Fixed #2278: Can not make widget (checkbox) to read-only by adding flags PDF_FIELD_IS_READ_ONLY
- Fixed #2290: Different image format/data from Page.get_text("dict") and Fitz.get_page_images()
- Fixed #2293: 68 failed tests when installing from sdist on my box
- Fixed #2300: Too much recursion in tree (parents), makes program terminate
- Fixed #2322: add_highlight_annot using clip generates "A Number is Out of Range" error in PDF
-
Other:
-
Add key "/AS (Yes)" to the underlying annot object of a selected button form field.
-
Remove unused
Documentmethodshas_xref_streams()and
has_old_style_xrefs()as MuPDF equivalents have been removed. -
Add new
Documentmethods and properties for getting/setting
/PageMode,/PageLayoutand/MarkInfo. -
New
Documentpropertyversion_count, which contains the number of
incremental saves plus one. -
New
Documentpropertyis_fast_webaccesswhich tells whether the
document is linearized. -
DocumentWriteris now a context manager. -
Add support for
PixmapJPEG output. -
Add support for drawing rectangles with rounded corners.
-
get_drawings(): added optionalextendedarg. -
Fixed issue where trace devices' state was not being initialised
correctly; data returned from things likefitz.Page.get_texttrace()
might be slightly altered, e.g.linewidthvalues. -
Output warning to
stderrif it looks like we are being used with
current directory containing an invalidfitz/directory, because
this can break import offitzmodule. For example this happens
if one attempts to usefitzwhen current directory is a PyMuPDF
checkout.
-
-
Documentation:
-
General rework:
- Introduces a new home page and new table of contents.
- Structural update to include new About section.
- Comparison & performance graphing.
- Includes performance methodology in appendix.
- Updates conf.py to understand single back-ticks as code.
- Converts double back-ticks to single back-ticks.
- Removes redundant files.
-
Improve
insert_file()documentation. -
get_bboxlog(): aded optionallayerstoget_bboxlog(). -
Page.get_texttrace(): add new dictionary keylayer, name of Optional Content Group. -
Mention use of Python venv in installation documentation.
-
Added missing fix for #2057 to release 1.21.1's changelog.
-
Fixes many links to the PyMuPDF-Utilities repo scripts.
-
Avoid duplication of
changes.txtanddocs/changes.rst.
-
-
Build
- Added
pyproject.tomlfile to improve builds using pip etc.
- Added
PyMuPDF-1.21.1 released
PyMuPDF-1.21.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
Changes in Version 1.21.1 (2022-12-13)
-
This release uses
MuPDF-1.21.1. -
Bug fixes:
- Fixed #2110: Fully embedded font is extracted only partially if it occupies more than one object
- Fixed #2094: Rectangle Detection Logic
- Fixed #2088: Destination point not set for named links in toc
- Fixed #2087: Image with Filter "[/FlateDecode/JPXDecode]" not extracted
- Fixed #2086: Document.save() owner_pw & user_pw has buffer overflow bug
- Fixed #2076: Segfault in fitz.py
- Fixed #2051: Missing DPI Parameter
- Fixed #2048: Invalid size of TextPage and bbox with newest version 1.21.0
- Fixed #2045: SystemError: returned a result with an error set
- Fixed #2039: 1.21.0 fails to build against system libmupdf
- Fixed #2036: Archive::Archive defined twice
-
Other
- Swallow "&zoom=nan" in link uri strings.
- Add new Page utility methods
Page.replace_image()andPage.delete_image().
-
Documentation:
- #2040: Added note about test failure with non-default build of MuPDF, to
tests/README.md. - #2037: In
docs/installation.rst, mention incompatibility with chocolatey.org on Windows. - #2061: Fixed description of
Annot.file_info. - #2065: Show how to insert internal PDF link.
- Improved description of building from source without an sdist.
- Added information about running tests.
- #2084: Fixed broken link to PyMuPDF-Utilities.
- #2040: Added note about test failure with non-default build of MuPDF, to
PyMuPDF-1.21.0 released
PyMuPDF-1.21.0 has been released.
-
This release uses
MuPDF-1.21.0. -
New feature: Stories.
-
Added wheels for Python-3.11.
-
Bug fixes:
- Fixed #1701: Broken custom image insertion.
- Fixed #1854:
Document.delete_pages()declines keyword arguments. - Fixed #1868: Access Violation Error at
page.apply_redactions(). - Fixed #1909: Adding text with
fontname="Helvetica"can silently fail. - Fixed #1913:
draw_rect(): does not respect width if color is not specified. - Fixed #1917:
subset_fonts(): make it possible to silence the stdout. - Fixed #1936: Rectangle detection can be incorrect producing wrong output.
- Fixed #1945: Segmentation fault when saving with
clean=True. - Fixed #1965:
pdfocr_save()Hard Crash. - Fixed #1971: Segmentation fault when using
get_drawings(). - Fixed #1946:
block_noandblock_typeswitched inget_text()docs. - Fixed #2013: AttributeError: 'Widget' object has no attribute '_annot' in delete widget.
-
Misc changes to core code:
- Fixed various compiler warnings and a sequence-point bug.
- Added support for Memento builds.
- Fixed leaks detected by Memento in test suite.
- Fixed handling of exceptions in set_name() and set_rect().
- Allow build with latest MuPDF, for regular testing of PyMuPDF master.
- Cope with new MuPDF exceptions when setting rect for some Annot types.
- Reduced cosmetic differences between MuPDF's config.h and PyMuPDF's _config.h.
- Cope with various changes to MuPDF API.
-
Other:
- Fixed various broken links and typos in docs.
- Mention install of
swig-pythonon MacOS for #875. - Added (untested) wheels for macos-arm64.
Second release candidate for PyMuPDF-1.21.0: PyMuPDF-1.21.0rc2
This is largely unchanged from 1.21.0rc1, except that it builds with the official MuPDF-1.21.0 release.
Install with: python -m pip install pymupdf==1.21.0rc2
- Uses mupdf-1.21.0.
- New Story support.
- Added wheels for Python-3.11.
- Docs: https://pymupdf.readthedocs.io/en/1.21.0rc2/
Release candidate for PyMuPDF-1.21.0: PyMuPDF-1.21.0rc1
Install with: python -m pip install pymupdf==1.21.0rc1
- Uses mupdf-1.21.0-rc1.
- New Story support.
- Added wheels for Python-3.11.
- Docs: https://pymupdf.readthedocs.io/en/1.21.0rc1/
PyMuPDF-1.20.2
- Built with MuPDF-1.20.3.
- Fix #1787.
- Fix #1824.
- Improvements to documentation:
- Moved old
docs/faq.rstinto separatedocs/recipes-*files. - Improved information about building from source in
docs/installation.rst. - Clarified memory allocation setting
JM_MEMORYindocs/tools.rst. - Fixed link to PDF Reference manual in
docs/app3.rst. - Fixed building of html documentation on OpenBSD.
- Moved old
Wheels for Windows, Linux and MacOS, and the sdist, are available on pypi.org and can be installed in the usual way, for example:
pip install --upgrade pymupdf
PyMuPDF-1.20.1
PyMuPDF-1.20.0
This release integrates the recently-released MuPDF-1.20.0, and has fixes for #1733 and #1738. The latter also contains an additional fix for occasional SEGVs when freeing documents.
Building from source works slightly differently from before:
- We now automatically download the required MuPDF source and build it into PyMuPDF.
- Python sdists (source distributions) already contain the required MuPDF source and build without downloading.
- One can override the default build behaviour by setting environmental variables, for example to build with a system-installed mupdf. See the doc-comment at the start of
setup.pyfor details.
Bug fixes and minor enhancements
Enhancements:
- new method
Page.load_widget()to load a widget from its xref - new dictionary
pdfcolorwhich contains 500 predefined PDF colors Quadclass supports operator algebra- text search and extraction default flags now accessible as predefined constants
- iterators
Page.annots()andPage.widgets()now prohibit reloading the page within their scope - removed multiple utility functions from the
Toolsclass and redefined them as standalone - Parameter
newinDocument.update_stream()is now obsolete.
Bug fixes and, minor enhancements
Fixes: #1583, #1552, #1550, #1521, #1518, #1513, #1510, #1417, #1550.
Also fixed some undocumented errors that caused the span["origin"] to be incorrectly set in corner cases.
Added new items "orientation" and associated transformtion matrix to the output of fitz.image_properties(), which contains EXIF data of supporting image files.
A new method Document.xref_copy() allows making xref objects duplicates of each other.