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 PDF rendering library MuPDF
11
11
Description:
12
-
Release date: March 27, 2020
12
+
Release date: March 29, 2020
13
13
14
14
Authors
15
15
=======
@@ -20,7 +20,7 @@ Description:
20
20
Introduction
21
21
============
22
22
23
-
This is **version 1.16.15 of PyMuPDF**, a Python binding for `MuPDF <http://mupdf.com/>`_ - "a lightweight PDF and XPS viewer".
23
+
This is **version 1.16.16 of PyMuPDF**, a Python binding for `MuPDF <http://mupdf.com/>`_ - "a lightweight PDF and XPS viewer".
24
24
25
25
MuPDF can access files in PDF, XPS, OpenXPS, epub, comic and fiction book formats, and it is known for both, its top performance and high rendering quality.
@@ -14,7 +14,7 @@ On **[PyPI](https://pypi.org/project/PyMuPDF)** since August 2016: [**, a Python binding with support for [MuPDF 1.16.*](http://mupdf.com/) - "a lightweight PDF, XPS, and E-book viewer".
17
+
This is **version 1.16.16 of PyMuPDF (formerly python-fitz)**, a Python binding with support for [MuPDF 1.16.*](http://mupdf.com/) - "a lightweight PDF, XPS, and E-book viewer".
18
18
19
19
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.
20
20
@@ -52,7 +52,7 @@ Have a look at the basic [demos](https://github.com/pymupdf/PyMuPDF-Utilities/tr
52
52
53
53
Our **documentation**, written using Sphinx, is available in various formats from the following sources. It currently is a combination of a reference guide and a user manual. For a **quick start** look at the [tutorial](https://pymupdf.readthedocs.io/en/latest/tutorial/) and the [recipes](https://pymupdf.readthedocs.io/en/latest/faq/) chapters.
54
54
55
-
* You can view it online at [Read the Docs](https://readthedocs.org/projects/pymupdf/). This site also provides download options for zipped HTML and PDF.
55
+
* You can view it online at [Read the Docs](https://pymupdf.readthedocs.io/). This site also provides download options for zipped HTML and PDF.
56
56
* Find a Windows help file [here](https://github.com/pymupdf/PyMuPDF-optional-material/tree/master/doc/PyMuPDF.chm).
Copy file name to clipboardExpand all lines: docs/annot.rst
+18-9Lines changed: 18 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -83,7 +83,12 @@ There is a parent-child relationship between an annotation and its page. If the
83
83
84
84
.. method:: setLineEnds(start, end)
85
85
86
-
Sets an annotation's line ending styles. Only 'FreeText', 'Line', 'PolyLine', and 'Polygon' annotations can have these properties. Each of these annotation types is defined by a list of points which are connected by lines. The symbol identified by *start* is attached to the first point, and *end* to the last point of this list. For unsupported annotation types, a no-operation with a warning message results.
86
+
Sets an annotation's line ending styles. Each of these annotation types is defined by a list of points which are connected by lines. The symbol identified by *start* is attached to the first point, and *end* to the last point of this list. For unsupported annotation types, a no-operation with a warning message results.
87
+
88
+
.. note::
89
+
90
+
* While only 'FreeText', 'Line', 'PolyLine', and 'Polygon' annotations can have these properties, (Py-) MuPDF does not support line ends for 'FreeText', because the call-out variant for these is not supported.
91
+
* *(Changed in v1.16.16)* Some symbols have an interior area (diamonds, circles, squares, etc.). By default, these areas are filled with the fill color of the annotation. If this is *None*, then white is chosen. The *fill_color* argument of :meth:`Annot.update` can now be used to override this.
87
92
88
93
:arg int start: The symbol number for the first point.
89
94
:arg int end: The symbol number for the last point.
@@ -127,7 +132,7 @@ There is a parent-child relationship between an annotation and its page. If the
127
132
128
133
:arg str name: the new name.
129
134
130
-
.. 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 as is, horizontally centered in **one line** and be shortened to fit. To avoid this make sure the following inequality is true: ``fitz.getTextlength(text, fontname="tiro", fontsize=20) / annot.rect.width <= 0.85``.
135
+
.. 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``.
131
136
132
137
.. method:: setRect(rect)
133
138
@@ -188,17 +193,21 @@ There is a parent-child relationship between an annotation and its page. If the
188
193
* :meth:`fileUpd`
189
194
* :meth:`setInfo` (except changes to *"content"*)
190
195
191
-
All arguments are optional. *(Changed in v1.16.14)* blend_mode and opacity are applicable to all annotation types. The other arguments **are reserved for 'FreeText'** annotations and ignored for other types.
196
+
All arguments are optional. *(Changed in v1.16.14)* Blend mode and opacity are applicable to all annotation types. The other arguments are mostly special use, as described below.
192
197
193
-
Color specifications may be made in the usual format used in PuMuPDF as sequences of floats ranging from 0.0 to 1.0 (including both). The sequence length must be 1, 3 or 4 (supporting GRAY, RGB and CMYK colorspaces respectively). For mono-color, just a float is also acceptable.
198
+
Color specifications may be made in the usual format used in PuMuPDF as sequences of floats ranging from 0.0 to 1.0 (including both). The sequence length must be 1, 3 or 4 (supporting GRAY, RGB and CMYK colorspaces respectively). For mono-color, just a float is also acceptable and yields some shade of gray.
194
199
195
200
:arg float opacity: *(new in v1.16.14)* **valid for all annotation types:** change or set the annotation's transparency. Valid values are *0 <= opacity < 1*.
196
201
:arg str blend_mode: *(new in v1.16.14)* **valid for all annotation types:** change or set the annotation's blend mode. For valid values see :ref:`BlendModes`.
197
-
:arg float fontsize: change font size of the text.
198
-
:arg sequence,float text_color: change the text color.
199
-
:arg sequence,float border_color: change the border color.
200
-
:arg sequence,float fill_color: the fill color. If you set (or leave) this to *None*, then **no rectangle at all** will be drawn around the text, and the border color will be ignored. This will leave anything "under" the text visible.
201
-
:arg int rotate: new rotation value. Default (-1) means no change.
202
+
:arg float fontsize: change font size of the text. 'FreeText' annotations only.
203
+
:arg sequence,float text_color: change the text color. 'FreeText' annotations only.
204
+
:arg sequence,float border_color: change the border color. 'FreeText' annotations only.
205
+
:arg sequence,float fill_color: the fill color.
206
+
207
+
* 'FreeText' annotations: If you set (or leave) this to *None*, then **no rectangle at all** will be drawn around the text, and the border color will be ignored. This will leave anything "under" the text visible.
208
+
* 'Line', 'Polyline', 'Polygon' annotations: use it for line end symbols to give them a fill color other than the one of the annotation *(changed in v1.16.16)*
209
+
210
+
:arg int rotate: new rotation value. Default (-1) means no change. 'FreeText' annotations only.
This documentation covers PyMuPDF v1.16.15 features as of **2020-03-26 15:15:15**.
4
+
This documentation covers PyMuPDF v1.16.16 features as of **2020-03-29 09:44:30**.
5
5
6
6
.. note:: The major and minor versions of **PyMuPDF** and **MuPDF** will always be the same. Only the third qualifier (patch level) may be different from that of MuPDF.
0 commit comments