diff --git a/changes.txt b/changes.txt index f97b33a2a..1ed7e8911 100644 --- a/changes.txt +++ b/changes.txt @@ -4,6 +4,23 @@ Change Log **Changes in version 1.26.5** +* Fixed issues: + +* Other: + + * Partially address `2883 `_: Improve the Python type annotations for fitz_new + + We now define all class methods explicitly instead of with dynamic assignment. + + * Removed `pymupdf.utils.Shape` class, was duplicate of `pymupdf.Shape`. + + * Allow use of cibuildwheel to build and test on Pyodide. + + * In documentation, added section about Linux wheels and glibc compatibility. + + * Retrospectively mark #4544 as fixed in 1.26.4. + + **Changes in version 1.26.4** * Use MuPDF-1.26.7. @@ -20,6 +37,7 @@ Change Log * **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: : 'JM_new_bbox_device_Device' object has no attribute 'layer_name' + * **Fixed** `4544 `_: About pdf_clip_page * Other: diff --git a/docs/page.rst b/docs/page.rst index a01bd0d10..54b4b7e23 100644 --- a/docs/page.rst +++ b/docs/page.rst @@ -1971,6 +1971,8 @@ In a nutshell, this is what you can do with PyMuPDF: The method works best for text: All text on the page will be removed (decided by single character) that has no intersection with the rectangle. For vector graphics, the method will remove all paths that have no intersection with the rectangle. For images, the method will remove all images that have no intersection with the rectangle. Vectors and images **having** an intersection with the rectangle, will be kept in their entirety. The method roughly has the same effect as if four redactions had been applied that cover the rectangle's outside. + + * New in v1.26.4. .. method:: remove_rotation() diff --git a/src/__init__.py b/src/__init__.py index 63abf48b6..16905771b 100644 --- a/src/__init__.py +++ b/src/__init__.py @@ -6646,7 +6646,9 @@ def remove_hidden(cont_lines): if not page.get_contents(): continue if hidden_text: - xref = page.get_contents()[0] # only one b/o cleaning! + xrefs = page.get_contents() + assert len(xrefs) == 1 # only one because of cleaning. + xref = xrefs[0] cont = doc.xref_stream(xref) cont_lines = remove_hidden(cont.splitlines()) # remove hidden text if cont_lines: # something was actually removed