Skip to content

Releases: pymupdf/PyMuPDF

Fixes and minor improvements

02 Jun 11:01
Compare
Choose a tag to compare

The following habe been fixed:

  • #1043
  • #1053
  • undocumented occasional error calculating envelopping rectangle for paths in Page.get_drawings()
  • undocumented occasional loop in TextWriter.fill_textbox()
  • added method Font.char_lengths() which returns a tuple of all character widths for a given string. An improved version of Font.text_length()
  • greatly improved performance of Font.text_length()
  • added various ways to delete multiple PDF pages, among them are slices and the Python del statement
  • changed method Document.del_toc_item(): the item's title text will no longer be removed - instead the item is shown grayed-out to indicate its deletion.

Rewritten method `Page.insert_image`

05 May 12:43
Compare
Choose a tag to compare

Method Page.insert_image has been rewritten for improved performance in standard cases. Also introduced option to re-use pre-existing images in the file directly to provide another performance boost.
Other changes:

  • implemented or fixed #1042, #1041, #1037
  • minor improvements in PDF EmbeddedFiles handling for better support of building PDF collections apps.

New Image Transformation Matrix Available

10 Apr 12:24
Compare
Choose a tag to compare

Meta information for images embedded in document pages has been enriched by the so-called transformation matrix. It can be used to find out, what "happened" to the image rectangle to make it fit in its bbox on the page, like scaling and rotation.

Other changes are mostly minor bug fixes:
#990
#972

A new Page method get_image_info() is also available, which extracts image meta information from the page's TextPage - much like the corresponding Page.get_text("dict"), but without extracting any text or the image binary data themselves.

Minor bug fixes, improved Quad recovering for text extractions

22 Mar 12:29
Compare
Choose a tag to compare

Fixed: #941 #929 #927

  • included PDF trailer access in Document.xref_get_key()
  • added a number of functions for recovering text quads in "dict" / "rawdict" text extractions

Fixes and improved font subsetting

26 Feb 23:04
Compare
Choose a tag to compare

Fixed #888, #895, #896, #885, #922
Implemented #897 (text output right-to-left).

  • Font subsetting now works without rewriting the respective text.
  • Added a utility function to compute the quad of a text span for "dict" and "rawdict" text extraction.

Some hot fixes

04 Feb 21:17
Compare
Choose a tag to compare

Interesting new features and several fixes

02 Feb 21:00
Compare
Choose a tag to compare

Fixes:

Implemented enhancement requests:

  • #855, which allows font subsetting using package fontTools

  • #870, which allows convert_to_pdf method also for PDF documents.

  • #843, Document.tobytes() (formerly Document.write()) now also support linearized output. Plus several extensions / improvements around supporting Python fileobjects.

  • Added new methods to quickly determine whether a PDF has annotations or links.

  • Extended the Document.scrub() method with a new parameter, which allows to also remove page thumbnails.

  • Added methods to directly inquire and set values in PDF objects - without the need to manipulating PDF object sources in an unwieldy way - see methods Document.xref_set_key() / Document.xref_get_key().

Continued the process of changing the naming convention for class methods and attributes to "snake_case". As announced before, this is a tedious, error-prone process, and requires special care to maintain a high backlevel support for existing scripts.
In future versions - probably synchronously to MuPDF v1.19.0 - we will remove definitions of old names, but a method for re-activating old aliases will remain available.

Bug Fixes and some new features

07 Jan 14:09
Compare
Choose a tag to compare

The recent introduction of "Discussions" by Github has been very motivating for our users.
Based on their feedback, several enhancement have been implemented.
Here is a selection:

  • Most Python functions now have typing / annotation support .
  • For PDF table-of-contents items, colors are now supported (reading and writing)
  • PDF page label support for reading and writing
  • Support personalized tagging of new annotations, fields and links for easier selection of relevant objects.

There also is a number of fixes - please consult the documentation.

Minor fixes, improved font metrics handling

17 Dec 10:46
Compare
Choose a tag to compare

Font metrics handling has been improved: text box writing now observes the relevant font properties when determining line heights.
In this course a new option has been introduced, which allows getting text bboxes (glyphs, spans, text search quads, etc.) that more exactly wrap the text only - as opposed to always returning line height bboxes.

Fixes:

Better Optional Content support

20 Nov 16:38
Compare
Choose a tag to compare
  • Improved PDF Optional Content support

  • Started overhaul of method and attribute naming

  • Introduced support of Popup annotations

  • Implemented the following fixes: