You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Summary: PyMuPDF is a Python binding for the document renderer and toolkit MuPDF
12
12
Description:
13
-
Release date: May 5, 2021
13
+
Release date: June 1, 2021
14
14
15
15
Authors
16
16
=======
@@ -21,7 +21,7 @@ Description:
21
21
Introduction
22
22
============
23
23
24
-
PyMuPDF (current version 1.18.13) is a Python binding with support for `MuPDF <http://mupdf.com/>`_ (current version 1.18.*), a lightweight PDF, XPS, and E-book viewer, renderer and toolkit, which is maintained and developed by Artifex Software, Inc.
24
+
PyMuPDF (current version 1.18.14) is a Python binding with support for `MuPDF <http://mupdf.com/>`_ (current version 1.18.*), a lightweight PDF, XPS, and E-book viewer, renderer and toolkit, which is maintained and developed by Artifex Software, Inc.
25
25
26
26
MuPDF can access files in PDF, XPS, OpenXPS, CBZ, EPUB and FB2 (e-books) formats, and it is known for its top performance and high rendering quality.
@@ -15,7 +15,7 @@ On **[PyPI](https://pypi.org/project/PyMuPDF)** since August 2016: [![Downloads]
15
15
16
16
# Introduction
17
17
18
-
PyMuPDF (current version 1.18.13) is a Python binding with support for [MuPDF](https://mupdf.com/) (current version 1.18.*), a lightweight PDF, XPS, and E-book viewer, renderer, and toolkit, which is maintained and developed by Artifex Software, Inc.
18
+
PyMuPDF (current version 1.18.14) is a Python binding with support for [MuPDF](https://mupdf.com/) (current version 1.18.*), a lightweight PDF, XPS, and E-book viewer, renderer, and toolkit, which is maintained and developed by Artifex Software, Inc.
19
19
20
20
MuPDF can access files in PDF, XPS, OpenXPS, CBZ, EPUB and FB2 (e-books) formats, and it is known for its top performance and high rendering quality.
21
21
@@ -65,7 +65,7 @@ Our **documentation**, written using Sphinx, is available in various formats fro
65
65
66
66
# Installation
67
67
68
-
For Windows, Linux and Mac OSX platforms, there are wheels in the [download](https://pypi.org/project/PyMuPDF/#files) section of PyPI. This includes Python 64bit versions **3.6 through 3.9**. For Windows only, 32bit versions are available too. Since version 1.18.13 there also exist wheels for the Linux ARM architecture - look for platform tag ``manylinux2014_aarch64``.
68
+
For Windows, Linux and Mac OSX platforms, there are wheels in the [download](https://pypi.org/project/PyMuPDF/#files) section of PyPI. This includes Python 64bit versions **3.6 through 3.9**. For Windows only, 32bit versions are available too. Since version 1.18.14 there also exist wheels for the Linux ARM architecture - look for platform tag ``manylinux2014_aarch64``.
69
69
70
70
If your platform is not supported with one of our wheels, you need to generate PyMuPDF yourself as follows. This requires the development version of Python.
Copy file name to clipboardExpand all lines: changes.rst
+27-8Lines changed: 27 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,25 @@
1
1
Change Logs
2
2
===============
3
3
4
+
Changes in Version 1.18.14
5
+
---------------------------
6
+
* **Finished** implementing new, "snake_cased" names for methods and properties, that were "camelCased" and awkward in many aspects. At the end of this documentation, there is section :ref:`Deprecated` with more background and a mapping of old to new names.
7
+
8
+
* **Fixed** issue `#1053 <https://github.com/pymupdf/PyMuPDF/issues/1053>`_. :meth:`Page.insert_image`: when given, include image mask in the hash computation.
9
+
10
+
* **Fixed** issue `#1043 <https://github.com/pymupdf/PyMuPDF/issues/1043>`_. Added ``Pixmap.getPNGdata`` to the aliases of :meth:`Pixmap.tobytes`.
11
+
12
+
* **Fixed** an internal error when computing the envelopping rectangle of drawn paths as returned by :meth:`Page.get_drawings`.
13
+
14
+
* **Fixed** an internal error occasionally causing loops when outputting text via :meth:`TextWriter.fill_textbox`.
15
+
16
+
* **Added** :meth:`Font.char_lengths`, which returns a tuple of character widths of a string.
17
+
18
+
* **Added** more ways to specify pages in :meth:`Document.delete_pages`. Now a sequence (list, tuple or range) can be specified, and the Python ``del`` statement can be used. In the latter case, Python ``slices`` are also accepted.
19
+
20
+
* **Changed** :meth:`Document.del_toc_item`, which disables a single item of the TOC: previously, the title text was removed. Instead, now the complete item will be shown grayed-out by supporting viewers.
@@ -426,13 +445,13 @@ Minor changes compared to version 1.16.2. The code of the "dict" and "rawdict" v
426
445
Changes in Version 1.16.2
427
446
---------------------------
428
447
* **Changed** text extraction methods of :ref:`Page` to allow detail control of the amount of extracted data.
429
-
* **Added** :meth:`planishLine` which maps a given line (defined as a pair of points) to the x-axis.
448
+
* **Added** :meth:`planish_line` which maps a given line (defined as a pair of points) to the x-axis.
430
449
* **Fixed** an issue (w/o Github number) which brought down the interpreter when encountering certain non-UTF-8 encodable characters while using :meth:`Page.getText` with te "dict" option.
431
450
* **Fixed** issue #362 ("Memory Leak with getText('rawDICT')").
432
451
433
452
Changes in Version 1.16.1
434
453
---------------------------
435
-
* **Added** property :attr:`Quad.isConvex` which checks whether a line is contained in the quad if it connects two points of it.
454
+
* **Added** property :attr:`Quad.is_convex` which checks whether a line is contained in the quad if it connects two points of it.
436
455
* **Changed** :meth:`Document.insert_pdf` to now allow dropping or including links and annotations independently during the copy. Fixes issue #352 ("Corrupt PDF data and ..."), which seemed to intermittently occur when using the method for some problematic PDF files.
437
456
* **Fixed** a bug which, in matrix division using the syntax *"m1/m2"*, caused matrix *"m1"* to be **replaced** by the result instead of delivering a new matrix.
438
457
* **Fixed** issue #354 ("SyntaxWarning with Python 3.8"). We now always use *"=="* for literals (instead of the *"is"* Python keyword).
@@ -540,7 +559,7 @@ Changes in Version 1.14.9
540
559
* **Added** new low-level method :meth:`Document._getTrailerString`, which returns the trailer object of a PDF. This is much like :meth:`Document._getXrefString` except that the PDF trailer has no / needs no :data:`xref` to identify it.
541
560
* **Added** new parameters for text insertion methods. You can now set stroke and fill colors of glyphs (text characters) independently, as well as the thickness of the glyph border. A new parameter *render_mode* controls the use of these colors, and whether the text should be visible at all.
542
561
* **Fixed** issue #258 ("Copying image streams to new PDF without size increase"): For JPX images embedded in a PDF, :meth:`Document.extractImage` will now return them in their original format. Previously, the MuPDF base library was used, which returns them in PNG format (entailing a massive size increase).
543
-
* **Fixed** issue #259 ("Morphing text to fit inside rect"). Clarified use of :meth:`getTextlength` and removed extra line breaks for long words.
562
+
* **Fixed** issue #259 ("Morphing text to fit inside rect"). Clarified use of :meth:`get_text_length` and removed extra line breaks for long words.
544
563
545
564
Changes in Version 1.14.8
546
565
---------------------------
@@ -553,7 +572,7 @@ Changes in Version 1.14.7
553
572
---------------------------
554
573
* **Added** :meth:`Pixmap.set_pixel` to change one pixel value.
555
574
* **Added** documentation for image conversion in the :ref:`FAQ`.
556
-
* **Added** new function :meth:`getTextlength` to determine the string length for a given font.
575
+
* **Added** new function :meth:`get_text_length` to determine the string length for a given font.
557
576
* **Added** Postscript image output (changed :meth:`Pixmap.save` and :meth:`Pixmap.tobytes`).
558
577
* **Changed** :meth:`Pixmap.save` and :meth:`Pixmap.tobytes` to ensure valid combinations of colorspace, alpha and output format.
559
578
* **Changed** :meth:`Pixmap.save`: the desired format is now inferred from the filename.
@@ -634,7 +653,7 @@ Changes in Version 1.13.17
634
653
* **Changed** method :meth:`Document.extractImage` to now return more meta information about the extracted imgage. Also, its performance has been greatly improved. Several demo scripts have been changed to make use of this method.
635
654
* **Changed** method :meth:`Document._getXrefStream` to now return *None* if the object is no stream and no longer raise an exception if otherwise.
636
655
* **Added** method :meth:`Document._deleteObject` which deletes a PDF object identified by its :data:`xref`. Only to be used by the experienced PDF expert.
637
-
* **Added** a method :meth:`PaperRect` which returns a :ref:`Rect` for a supplied paper format string. Example: *fitz.PaperRect("letter") = fitz.Rect(0.0, 0.0, 612.0, 792.0)*.
656
+
* **Added** a method :meth:`paper_rect` which returns a :ref:`Rect` for a supplied paper format string. Example: *fitz.paper_rect("letter") = fitz.Rect(0.0, 0.0, 612.0, 792.0)*.
638
657
* **Added** a :ref:`FAQ` chapter to this document.
639
658
640
659
Changes in Version 1.13.16
@@ -950,7 +969,7 @@ Please have a look at MuPDF's website to see which changes and enhancements are
950
969
951
970
Changes in version 1.9.1 compared to version 1.8.0 are the following:
952
971
953
-
* New methods *getRectArea()* for both *fitz.Rect* and *fitz.IRect*
972
+
* New methods *get_area()* for both *fitz.Rect* and *fitz.IRect*
954
973
* Pixmaps can now be created directly from files using the new constructor *fitz.Pixmap(filename)*.
955
974
* The Pixmap constructor *fitz.Pixmap(image)* has been extended accordingly.
956
975
* *fitz.Rect* can now be created with all possible combinations of points and coordinates.
@@ -964,9 +983,9 @@ Changes in version 1.9.1 compared to version 1.8.0 are the following:
964
983
* New pixmap method *samplesRGB()* providing a *samples* version with alpha bytes stripped off (RGB colorspaces only).
965
984
* New pixmap method *samplesAlpha()* providing the alpha bytes only of the *samples* area.
966
985
* New iterator *fitz.Pages(doc)* over a document's set of pages.
967
-
* New matrix methods *invert()* (calculate inverted matrix), *concat()* (calculate matrix product), *preTranslate()* (perform a shift operation).
986
+
* New matrix methods *invert()* (calculate inverted matrix), *concat()* (calculate matrix product), *pretranslate()* (perform a shift operation).
968
987
* New *IRect* methods *intersect()* (intersection with another rectangle), *translate()* (perform a shift operation).
969
-
* New *Rect* methods *intersect()* (intersection with another rectangle), *transform()* (transformation with a matrix), *includePoint()* (enlarge rectangle to also contain a point), *includeRect()* (enlarge rectangle to also contain another one).
988
+
* New *Rect* methods *intersect()* (intersection with another rectangle), *transform()* (transformation with a matrix), *include_point()* (enlarge rectangle to also contain a point), *include_rect()* (enlarge rectangle to also contain another one).
970
989
* Documented *Point.transform()* (transform a point with a matrix).
971
990
* *Matrix*, *IRect*, *Rect* and *Point* classes now support compact, algebraic formulations for manipulating such objects.
972
991
* Incremental saves for changes are possible now using the call pattern *doc.save(doc.name, incremental=True)*.
Copy file name to clipboardExpand all lines: docs/annot.rst
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -228,7 +228,7 @@ There is a parent-child relationship between an annotation and its page. If the
228
228
229
229
:arg str name: the new name.
230
230
231
-
.. caution:: If you set the name of a 'Stamp' annotation, then this will **not change** the rectangle, nor will the text be layouted in any way. If you choose a standard text from :ref:`StampIcons` (the **exact** name piece after "STAMP_"), you should receive the original layout. An **arbitrary text** will not be changed to upper case, but be written in font "Times-Bold" as is, horizontally centered in **one line** and be shortened to fit. To get your text fully displayed, its length using fontsize 20 must not exceed 190 pixels. So please make sure that the following inequality is true: ``fitz.getTextlength(text, fontname="tibo", fontsize=20) <= 190``.
231
+
.. caution:: If you set the name of a 'Stamp' annotation, then this will **not change** the rectangle, nor will the text be layouted in any way. If you choose a standard text from :ref:`StampIcons` (the **exact** name piece after "STAMP_"), you should receive the original layout. An **arbitrary text** will not be changed to upper case, but be written in font "Times-Bold" as is, horizontally centered in **one line** and be shortened to fit. To get your text fully displayed, its length using fontsize 20 must not exceed 190 pixels. So please make sure that the following inequality is true: ``fitz.get_text_length(text, fontname="tibo", fontsize=20) <= 190``.
0 commit comments