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 25, 2020
12
+
Release date: March 27, 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.14 of PyMuPDF**, a Python binding for `MuPDF <http://mupdf.com/>`_ - "a lightweight PDF and XPS viewer".
23
+
This is **version 1.16.15 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.15 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
@@ -107,5 +107,4 @@ Earlier versions are available in the [releases](https://github.com/pymupdf/PyMu
107
107
PyMuPDF is distributed under GNU GPL V3. Because you will implicitely also be using MuPDF, its license GNU AFFERO GPL V3 applies as well. Copies of both are included in this repository.
108
108
109
109
# Contact
110
-
111
110
Please submit questions, comments or issues [here](https://github.com/pymupdf/PyMuPDF/issues), or directly contact the authors via their e-mail addresses.
Copy file name to clipboardExpand all lines: docs/annot.rst
+12-2Lines changed: 12 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -105,19 +105,29 @@ There is a parent-child relationship between an annotation and its page. If the
105
105
:rtype: str
106
106
:returns: the blend mode or *None*.
107
107
108
+
>>> annot=page.firstAnnot
109
+
>>> annot.blendMode()
110
+
'Multiply'
111
+
112
+
108
113
.. method:: setBlendMode(blend_mode)
109
114
110
115
*(New in v1.16.14)* Set the annotation's blend mode. See :ref:`AdobeManual`, page 520 for explanations. The blend mode can also be set in :meth:`Annot.update`.
111
116
112
-
:arg str blend_mode: set the blend mode. Use :meth:`Annot.update` to reflect this in the visual appearance. For predefined values see :ref:`BlendModes`.
117
+
:arg str blend_mode: set the blend mode. Use :meth:`Annot.update` to reflect this in the visual appearance. For predefined values see :ref:`BlendModes`. The best way to **remove** a special blend mode is choosing ``PDF_BM_Normal``.
*(New in version 1.16.0)* Change the name field of any annotation type. For 'FileAttachment' and 'Text' annotations, this is the icon name, for 'Stamp' annotations the text in the stamp. The visual result (if any) depends on your PDF viewer. See also :ref:`mupdficons`.
117
127
118
128
:arg str name: the new name.
119
129
120
-
.. 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**. If its length exceeds the available width, it will be accordingly shortened. To ensure your own text will **not be shortened**, ensure that ``fitz.getTextLength(text, fontname="tiro", fontsize=20) / annot.rect.width <= 0.85``.
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``.
Copy file name to clipboardExpand all lines: docs/tools.rst
+17Lines changed: 17 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,6 +13,8 @@ This class is a collection of utility methods and attributes, mainly around memo
13
13
:meth:`Tools.mupdf_warnings` return the accumulated MuPDF warnings
14
14
:meth:`Tools.mupdf_display_errors` return the accumulated MuPDF warnings
15
15
:meth:`Tools.reset_mupdf_warnings` empty MuPDF messages on STDOUT
16
+
:meth:`Tools.set_aa_level` set the anti-aliasing values
17
+
:meth:`Tools.show_aa_level` return the anti-aliasing values
16
18
:attr:`Tools.fitz_config` configuration settings of PyMuPDF
17
19
:attr:`Tools.store_maxsize` maximum storables cache size
18
20
:attr:`Tools.store_size` current storables cache size
@@ -43,6 +45,21 @@ This class is a collection of utility methods and attributes, mainly around memo
43
45
:rtype: int
44
46
:returns: the new current store size. Depending on the situation, the size reduction may be larger than the requested percentage.
45
47
48
+
.. method:: show_aa_level()
49
+
50
+
*(New in version 1.16.14)* Return the current anti-aliasing values. These values control the rendering quality of graphics and text elements.
51
+
52
+
:rtype: dict
53
+
:returns: A dictionary with the following initial content: ``{'graphics': 8, 'text': 8, 'graphics_min_line_width': 0.0}``.
54
+
55
+
56
+
.. method:: set_aa_level(level)
57
+
58
+
*(New in version 1.16.14)* Set the new number of bits to use for anti-aliasing. The same value is taken currently for graphics and text rendering. This might change in a future MuPDF release.
59
+
60
+
:arg int level: an integer ranging between 0 and 8. Value outside this range will be silently changed to valid values. The value will remain in effect throughout the current session or until changed again.
This documentation covers PyMuPDF v1.16.14 features as of **2020-03-25 11:44:22**.
4
+
This documentation covers PyMuPDF v1.16.15 features as of **2020-03-26 15:15:15**.
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