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: February 23, 2020
12
+
Release date: March 05, 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.11 of PyMuPDF**, a Python binding for `MuPDF <http://mupdf.com/>`_ - "a lightweight PDF and XPS viewer".
23
+
This is **version 1.16.12 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.12 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.
Copy file name to clipboardExpand all lines: docs/annot.rst
+35-29Lines changed: 35 additions & 29 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,35 +11,36 @@ Quote from the :ref:`AdobeManual`: "An annotation associates an object such as a
11
11
There is a parent-child relationship between an annotation and its page. If the page object becomes unusable (closed document, any document structure change, etc.), then so does every of its existing annotation objects -- an exception is raised saying that the object is "orphaned", whenever an annotation property or method is accessed.
* **Added** JavaScript support to PDF form fields, thereby addressing `#454 <https://github.com/pymupdf/PyMuPDF/issues/454>`_.
10
+
* **Added** a new annotation method :meth:`Annot.delete_responses`, which removes 'Popup' and response annotations referring to the current one.
11
+
* **Added** a new form field method :meth:`Widget.reset`, which resets the field value to its default.
12
+
* **Changed** and extended handling of redactions: images and XObjects are removed if *contained* in a redaction rectangle. Any partial overlaps will just be covered by the redaction background color. Now a text can be specified to be inserted in the rectangle area to **replace the deleted original** text. This resolves `#434 <https://github.com/pymupdf/PyMuPDF/issues/434>`_.
13
+
4
14
Changes in Version 1.16.11
5
15
---------------------------
6
16
* **Added** Support for redaction annotations via method :meth:`Page.addRedactAnnot` and :meth:`Page.apply_redactions`.
Copy file name to clipboardExpand all lines: docs/colors.rst
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -37,7 +37,7 @@ As the color database may not be needed very often, one additional import statem
37
37
38
38
Printing the Color Database
39
39
----------------------------
40
-
If you want to actually see how the many available colors look like, use scripts `colordbRGB.py <https://github.com/pymupdf/PyMuPDF/blob/master/examples/colordbRGB.py>`_ or `colordbHSV.py <https://github.com/pymupdf/PyMuPDF/blob/master/examples/colordbHSV.py>`_ in the examples directory. They create PDFs (already existing in the same directory) with all these colors. Their only difference is sorting order: one takes the RGB values, the other one the Hue-Saturation-Values as sort criteria.
40
+
If you want to actually see how the many available colors look like, use scripts `colordbRGB.py <https://github.com/pymupdf/PyMuPDF-Utilities/tree/master/examples/colordbRGB.py>`_ or `colordbHSV.py <https://github.com/pymupdf/PyMuPDF-Utilities/tree/master/examples/colordbHSV.py>`_ in the examples directory. They create PDFs (already existing in the same directory) with all these colors. Their only difference is sorting order: one takes the RGB values, the other one the Hue-Saturation-Values as sort criteria.
41
41
This is a screen print of what these files look like.
Copy file name to clipboardExpand all lines: docs/document.rst
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -500,7 +500,7 @@ For addional details on **embedded files** refer to Appendix 3.
500
500
501
501
1. If *from_page > to_page*, pages will be **copied in reverse order**. If *0 <= from_page == to_page*, then one page will be copied.
502
502
503
-
2. *docsrc* bookmarks **will not be copied**. It is easy however, to recover a table of contents for the resulting document. Look at the examples below and at program `PDFjoiner.py <https://github.com/pymupdf/PyMuPDF/blob/master/examples/PDFjoiner.py>`_ in the *examples* directory: it can join PDF documents and at the same time piece together respective parts of the tables of contents.
503
+
2. *docsrc* bookmarks **will not be copied**. It is easy however, to recover a table of contents for the resulting document. Look at the examples below and at program `PDFjoiner.py <https://github.com/pymupdf/PyMuPDF-Utilities/tree/master/examples/PDFjoiner.py>`_ in the *examples* directory: it can join PDF documents and at the same time piece together respective parts of the tables of contents.
504
504
505
505
.. index::
506
506
pair: width; newPage (Document method)
@@ -894,7 +894,7 @@ Clear metadata information. If you do this out of privacy / data protection conc
894
894
895
895
:meth:`setToC` Demonstration
896
896
----------------------------------
897
-
This shows how to modify or add a table of contents. Also have a look at `csv2toc.py <https://github.com/pymupdf/PyMuPDF/blob/master/examples/csv2toc.py>`_ and `toc2csv.py <https://github.com/pymupdf/PyMuPDF/blob/master/examples/toc2csv.py>`_ in the examples directory.
897
+
This shows how to modify or add a table of contents. Also have a look at `csv2toc.py <https://github.com/pymupdf/PyMuPDF-Utilities/tree/master/examples/csv2toc.py>`_ and `toc2csv.py <https://github.com/pymupdf/PyMuPDF-Utilities/tree/master/examples/toc2csv.py>`_ in the examples directory.
898
898
899
899
>>> import fitz
900
900
>>> doc = fitz.open("test.pdf")
@@ -927,7 +927,7 @@ This shows how to modify or add a table of contents. Also have a look at `csv2to
927
927
t[2] += pages1 # by old len(doc1)
928
928
>>> doc1.setToC(toc1 + toc2) # now result has total TOC
929
929
930
-
Obviously, similar ways can be found in more general situations. Just make sure that hierarchy levels in a row do not increase by more than one. Inserting dummy bookmarks before and after *toc2* segments would heal such cases. A ready-to-use GUI (wxPython) solution can be found in script `PDFjoiner.py <https://github.com/pymupdf/PyMuPDF/blob/master/examples/PDFjoiner.py>`_ of the examples directory.
930
+
Obviously, similar ways can be found in more general situations. Just make sure that hierarchy levels in a row do not increase by more than one. Inserting dummy bookmarks before and after *toc2* segments would heal such cases. A ready-to-use GUI (wxPython) solution can be found in script `PDFjoiner.py <https://github.com/pymupdf/PyMuPDF-Utilities/tree/master/examples/PDFjoiner.py>`_ of the examples directory.
931
931
932
932
**(2) More examples:**
933
933
@@ -965,4 +965,4 @@ Other Examples
965
965
966
966
.. [#f1] Content streams describe what (e.g. text or images) appears where and how on a page. PDF uses a specialized mini language similar to PostScript to do this (pp. 985 in :ref:`AdobeManual`), which gets interpreted when a page is loaded.
967
967
968
-
.. [#f2] However, you **can** use :meth:`Document.getToC` and :meth:`Page.getLinks` (which are available for all document types) and copy this information over to the output PDF. See demo `pdf-converter.py <https://github.com/pymupdf/PyMuPDF/blob/master/demo/pdf-converter.py>`_.
968
+
.. [#f2] However, you **can** use :meth:`Document.getToC` and :meth:`Page.getLinks` (which are available for all document types) and copy this information over to the output PDF. See demo `pdf-converter.py <https://github.com/pymupdf/PyMuPDF-Utilities/tree/master/demo/pdf-converter.py>`_.
Copy file name to clipboardExpand all lines: docs/faq.rst
+15-4Lines changed: 15 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -763,7 +763,7 @@ If you see a table in a document, you are not normally looking at something like
763
763
764
764
Extracting a tabular data from such a page area therefore means that you must find a way to **(1)** graphically indicate table and column borders, and **(2)** then extract text based on this information.
765
765
766
-
The wxPython GUI script `wxTableExtract.py <https://github.com/pymupdf/PyMuPDF/blob/master/examples/wxTableExtract.py>`_ strives to exactly do that. You may want to have a look at it and adjust it to your liking.
766
+
The wxPython GUI script `wxTableExtract.py <https://github.com/pymupdf/PyMuPDF-Utilities/tree/master/examples/wxTableExtract.py>`_ strives to exactly do that. You may want to have a look at it and adjust it to your liking.
767
767
768
768
----------
769
769
@@ -1096,7 +1096,7 @@ The result looks like this:
1096
1096
1097
1097
How to Use FreeText
1098
1098
~~~~~~~~~~~~~~~~~~~~~
1099
-
This script shows a couple of possibilities for 'FreeText' annotations::
1099
+
This script shows a couple of ways to deal with 'FreeText' annotations::
1100
1100
1101
1101
# -*- coding: utf-8 -*-
1102
1102
import fitz
@@ -1134,6 +1134,17 @@ The result looks like this:
1134
1134
.. image:: images/img-freetext.jpg
1135
1135
:scale:80
1136
1136
1137
+
------------------------------
1138
+
1139
+
Using Buttons and JavaScript
1140
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1141
+
Since MuPDF v1.16, 'FreeText' annotations no longer support bold or italic versions of the Times-Roman, Helvetica or Courier fonts.
1142
+
1143
+
A big **thank you** to our user `@kurokawaikki <https://github.com/kurokawaikki>`_, who contributed the following script to **circumvent this restriction**.
1144
+
1145
+
.. literalinclude:: make-bold.py
1146
+
:language: python
1147
+
1137
1148
--------------------------
1138
1149
1139
1150
How to Use Ink Annotations
@@ -1319,7 +1330,7 @@ PDF supports incorporating arbitrary data. This can be done in one of two ways:
1319
1330
1320
1331
The basic differences between these options are **(1)** you need edit permission to embed a file, but only annotation permission to attach, **(2)** like all annotations, attachments are visible on a page, embedded files are not.
1321
1332
1322
-
There exist several example scripts: `embedded-list.py <https://github.com/pymupdf/PyMuPDF/blob/master/examples/embedded-list.py>`_, `new-annots.py <https://github.com/pymupdf/PyMuPDF/blob/master/demo/new-annots.py>`_.
1333
+
There exist several example scripts: `embedded-list.py <https://github.com/pymupdf/PyMuPDF-Utilities/tree/master/examples/embedded-list.py>`_, `new-annots.py <https://github.com/pymupdf/PyMuPDF-Utilities/tree/master/demo/new-annots.py>`_.
1323
1334
1324
1335
Also look at the sections above and at chapter :ref:`Appendix 3`.
1325
1336
@@ -1374,7 +1385,7 @@ How to Join PDFs
1374
1385
~~~~~~~~~~~~~~~~~~
1375
1386
It is easy to join PDFs with method :meth:`Document.insertPDF`. Given open PDF documents, you can copy page ranges from one to the other. You can select the point where the copied pages should be placed, you can revert the page sequence and also change page rotation. This Wiki `article <https://github.com/pymupdf/PyMuPDF/wiki/Inserting-Pages-from-other-PDFs>`_ contains a full description.
1376
1387
1377
-
The GUI script `PDFjoiner.py <https://github.com/pymupdf/PyMuPDF/blob/master/examples/PDFjoiner.py>`_ uses this method to join a list of files while also joining the respective table of contents segments. It looks like this:
1388
+
The GUI script `PDFjoiner.py <https://github.com/pymupdf/PyMuPDF-Utilities/tree/master/examples/PDFjoiner.py>`_ uses this method to join a list of files while also joining the respective table of contents segments. It looks like this:
0 commit comments