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