Skip to content

Commit c9a17d7

Browse files
committed
Upgrade to version 1.18.14.
1 parent 745718a commit c9a17d7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+2333
-1615
lines changed

PKG-INFO

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Metadata-Version: 1.1
22
Name: PyMuPDF
3-
Version: 1.18.13
3+
Version: 1.18.14
44
Author: Jorj McKie
55
Author-email: jorj.x.mckie@outlook.de
66
License: GNU AFFERO GPL 3.0
@@ -10,7 +10,7 @@ Home-page: https://github.com/pymupdf/PyMuPDF
1010
Download-url: https://github.com/pymupdf/PyMuPDF
1111
Summary: PyMuPDF is a Python binding for the document renderer and toolkit MuPDF
1212
Description:
13-
Release date: May 5, 2021
13+
Release date: June 1, 2021
1414

1515
Authors
1616
=======
@@ -21,7 +21,7 @@ Description:
2121
Introduction
2222
============
2323

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.
2525

2626
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.
2727

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
# PyMuPDF 1.18.13
1+
# PyMuPDF 1.18.14
22

33
![logo](https://github.com/pymupdf/PyMuPDF/blob/master/demo/pymupdf.jpg)
44

5-
Release date: May 5, 2021
5+
Release date: June 1, 2021
66

77
**Travis-CI:** [![Build Status](https://travis-ci.org/JorjMcKie/py-mupdf.svg?branch=master)](https://travis-ci.org/JorjMcKie/py-mupdf)
88

@@ -15,7 +15,7 @@ On **[PyPI](https://pypi.org/project/PyMuPDF)** since August 2016: [![Downloads]
1515

1616
# Introduction
1717

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.
1919

2020
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.
2121

@@ -65,7 +65,7 @@ Our **documentation**, written using Sphinx, is available in various formats fro
6565

6666
# Installation
6767

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``.
6969

7070
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.
7171

changes.rst

Lines changed: 27 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,25 @@
11
Change Logs
22
===============
33

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.
21+
22+
423
Changes in Version 1.18.13
524
---------------------------
625
* **Fixed** issue `#1014 <https://github.com/pymupdf/PyMuPDF/issues/1014>`_.
@@ -426,13 +445,13 @@ Minor changes compared to version 1.16.2. The code of the "dict" and "rawdict" v
426445
Changes in Version 1.16.2
427446
---------------------------
428447
* **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.
430449
* **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.
431450
* **Fixed** issue #362 ("Memory Leak with getText('rawDICT')").
432451

433452
Changes in Version 1.16.1
434453
---------------------------
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.
436455
* **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.
437456
* **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.
438457
* **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
540559
* **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.
541560
* **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.
542561
* **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.
544563

545564
Changes in Version 1.14.8
546565
---------------------------
@@ -553,7 +572,7 @@ Changes in Version 1.14.7
553572
---------------------------
554573
* **Added** :meth:`Pixmap.set_pixel` to change one pixel value.
555574
* **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.
557576
* **Added** Postscript image output (changed :meth:`Pixmap.save` and :meth:`Pixmap.tobytes`).
558577
* **Changed** :meth:`Pixmap.save` and :meth:`Pixmap.tobytes` to ensure valid combinations of colorspace, alpha and output format.
559578
* **Changed** :meth:`Pixmap.save`: the desired format is now inferred from the filename.
@@ -634,7 +653,7 @@ Changes in Version 1.13.17
634653
* **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.
635654
* **Changed** method :meth:`Document._getXrefStream` to now return *None* if the object is no stream and no longer raise an exception if otherwise.
636655
* **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)*.
638657
* **Added** a :ref:`FAQ` chapter to this document.
639658

640659
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
950969

951970
Changes in version 1.9.1 compared to version 1.8.0 are the following:
952971

953-
* New methods *getRectArea()* for both *fitz.Rect* and *fitz.IRect*
972+
* New methods *get_area()* for both *fitz.Rect* and *fitz.IRect*
954973
* Pixmaps can now be created directly from files using the new constructor *fitz.Pixmap(filename)*.
955974
* The Pixmap constructor *fitz.Pixmap(image)* has been extended accordingly.
956975
* *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:
964983
* New pixmap method *samplesRGB()* providing a *samples* version with alpha bytes stripped off (RGB colorspaces only).
965984
* New pixmap method *samplesAlpha()* providing the alpha bytes only of the *samples* area.
966985
* 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).
968987
* 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).
970989
* Documented *Point.transform()* (transform a point with a matrix).
971990
* *Matrix*, *IRect*, *Rect* and *Point* classes now support compact, algebraic formulations for manipulating such objects.
972991
* Incremental saves for changes are possible now using the call pattern *doc.save(doc.name, incremental=True)*.

docs/_static/jquery.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,7 @@
379379
for (b in a);
380380
return b === w || aa.call(a, b)
381381
},
382-
isEmptyObject: function (a) {
382+
is_emptyObject: function (a) {
383383
for (var b in a) return false;
384384
return true
385385
},
@@ -642,7 +642,7 @@
642642
if (b) {
643643
if (e) {
644644
delete e[b];
645-
c.isEmptyObject(e) && c.removeData(a)
645+
c.is_emptyObject(e) && c.removeData(a)
646646
}
647647
} else {
648648
if (c.support.deleteExpando) delete a[c.expando];
@@ -1006,11 +1006,11 @@
10061006
}
10071007
}
10081008
}
1009-
if (c.isEmptyObject(C)) {
1009+
if (c.is_emptyObject(C)) {
10101010
if (b = z.handle) b.elem = null;
10111011
delete z.events;
10121012
delete z.handle;
1013-
c.isEmptyObject(z) && c.removeData(a)
1013+
c.is_emptyObject(z) && c.removeData(a)
10141014
}
10151015
}
10161016
}
@@ -3098,7 +3098,7 @@
30983098
},
30993099
animate: function (a, b, d, f) {
31003100
var e = c.speed(b, d, f);
3101-
if (c.isEmptyObject(a)) return this.each(e.complete);
3101+
if (c.is_emptyObject(a)) return this.each(e.complete);
31023102
return this[e.queue === false ? "each" : "queue"](function () {
31033103
var j = c.extend({}, e),
31043104
i, o = this.nodeType === 1 && c(this).is(":hidden"),

docs/_static/underscore.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,7 @@
340340
if (!b.isEqual(a[f], c[f])) return false;
341341
return true
342342
};
343-
b.isEmpty = function (a) {
343+
b.is_empty = function (a) {
344344
return b.keys(a).length ==
345345
0
346346
};

docs/annot.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ There is a parent-child relationship between an annotation and its page. If the
228228

229229
:arg str name: the new name.
230230

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``.
232232

233233
.. method:: set_rect(rect)
234234

0 commit comments

Comments
 (0)