pypi PyMuPDF 1.22.0
PyMuPDF-1.22.0 released

latest releases: 1.24.7, 1.24.6, 1.24.5...
14 months ago

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.
  • 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 Colorspace used in Pixmap
    • 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 attribute is_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 Document methods has_xref_streams() and
      has_old_style_xrefs() as MuPDF equivalents have been removed.

    • Add new Document methods and properties for getting/setting
      /PageMode, /PageLayout and /MarkInfo.

    • New Document property version_count, which contains the number of
      incremental saves plus one.

    • New Document property is_fast_webaccess which tells whether the
      document is linearized.

    • DocumentWriter is now a context manager.

    • Add support for Pixmap JPEG output.

    • Add support for drawing rectangles with rounded corners.

    • get_drawings(): added optional extended arg.

    • Fixed issue where trace devices' state was not being initialised
      correctly; data returned from things like fitz.Page.get_texttrace()
      might be slightly altered, e.g. linewidth values.

    • Output warning to stderr if it looks like we are being used with
      current directory containing an invalid fitz/ directory, because
      this can break import of fitz module. For example this happens
      if one attempts to use fitz when 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 optional layers to get_bboxlog().

    • Page.get_texttrace(): add new dictionary key layer, 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.txt and docs/changes.rst.

  • Build

    • Added pyproject.toml file to improve builds using pip etc.

Don't miss a new PyMuPDF release

NewReleases is sending notifications on new releases.