Skip to content

Commit 58ba522

Browse files
committed
publish v1.16.1
1 parent fb8c68d commit 58ba522

15 files changed

+441
-288
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.16.0
3+
Version: 1.16.1
44
Author: Ruikai Liu
55
Author-email: [email protected]
66
Maintainer: Jorj X. McKie
@@ -9,7 +9,7 @@ Home-page: https://github.com/pymupdf/PyMuPDF
99
Download-url: https://github.com/pymupdf/PyMuPDF
1010
Summary: PyMuPDF is a Python binding for the PDF rendering library MuPDF
1111
Description:
12-
Release date: August 31, 2019
12+
Release date: September 4, 2019
1313

1414
Authors
1515
=======
@@ -20,7 +20,7 @@ Description:
2020
Introduction
2121
============
2222

23-
This is **version 1.16.0 of PyMuPDF**, a Python binding for `MuPDF <http://mupdf.com/>`_ - "a lightweight PDF and XPS viewer".
23+
This is **version 1.16.1 of PyMuPDF**, a Python binding for `MuPDF <http://mupdf.com/>`_ - "a lightweight PDF and XPS viewer".
2424

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

README.md

Lines changed: 38 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,54 @@
1-
# PyMuPDF 1.16.0
1+
# PyMuPDF 1.16.1
22

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

5-
Release date: August 31, 2019
5+
Release date: September 4, 2019
66

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

99
On **[PyPI](https://pypi.org/project/PyMuPDF)** since August 2016: [![](https://pepy.tech/badge/pymupdf)](https://pepy.tech/project/pymupdf)
1010

1111
# Authors
12-
* [Ruikai Liu](mailto:[email protected])
1312
* [Jorj X. McKie](mailto:[email protected])
13+
* [Ruikai Liu](mailto:[email protected])
1414

1515
# Introduction
1616

17-
This is **version 1.16.0 of PyMuPDF (formerly python-fitz)**, a Python binding with support for [MuPDF 1.16.x](http://mupdf.com/) - "a lightweight PDF, XPS, and E-book viewer".
17+
This is **version 1.16.1 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".
1818

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

21-
With PyMuPDF you therefore can access files with extensions like ".pdf", ".xps", ".oxps", ".cbz", ".fb2" or ".epub" from your Python scripts.
21+
With PyMuPDF you can access files with extensions like ".pdf", ".xps", ".oxps", ".cbz", ".fb2" or ".epub". About 10 popular image formats are also supported via the document interface.
22+
23+
24+
# Usage and Documentation
25+
For all supported document types you can
26+
* decrypt the document
27+
* access meta information, links and bookmarks
28+
* render pages in raster formats (PNG and some others), or the vector format SVG
29+
* search for text
30+
* extract text or images
31+
* convert to other formats: PDF, (X) HTML, XML, text
32+
33+
> To some degree, PyMuPDF can therefore be used as an [image converter](https://github.com/pymupdf/PyMuPDF/wiki/How-to-Convert-Images): it can read a range of input formats and can produce **Portable Network Graphics (PNG)**, **Portable Anymaps** (**PNM**, etc.), **Portable Arbitrary Maps (PAM)**, **Adobe Postscript** and **Adobe Photoshop** documents, making the use of other graphics packages obselete in these cases. But interfacing with e.g. PIL/Pillow for image input and output is easy as well.
34+
35+
**PDF files** can be created, joined or split up. Pages can be inserted, deleted, re-arranged or modified in many ways (including annotations and form fields).
36+
37+
* Images and fonts can be extracted or inserted.
38+
* Embedded files are fully supported.
39+
* PDFs can be reformatted to support double-sided printing, posterizing, applying logos or watermarks
40+
* Password protection is fully supported: decryption, encryption, encryption method selection, permmission level and user / owner password setting.
41+
* Low-level PDF structures can be accessed and modified.
42+
2243

23-
See the [change log](https://pymupdf.readthedocs.io/en/latest/changes) and [usage recipes](https://pymupdf.readthedocs.io/en/latest/faq).
44+
Have a look at the basic [demos](https://github.com/pymupdf/PyMuPDF/tree/master/demo), the [examples](https://github.com/pymupdf/PyMuPDF/tree/master/examples) (which contain complete, working programs), and the **recipes** section of our [Wiki](https://github.com/pymupdf/PyMuPDF/wiki) sidebar, which contains more than a dozen of guides in How-To-style.
45+
46+
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.
47+
48+
* You can view it online at [Read the Docs](https://pymupdf.readthedocs.io/). For **best quality downloads** you should however use the following links.
49+
* zipped [HTML](https://github.com/pymupdf/PyMuPDF/tree/master/doc/html.zip)
50+
* [Windows CHM](https://github.com/pymupdf/PyMuPDF-optional-material/tree/master/doc/PyMuPDF.chm)
51+
* [PDF](https://github.com/pymupdf/PyMuPDF/blob/master/doc/PyMuPDF.pdf)
2452

2553
# Installation
2654

@@ -41,10 +69,11 @@ To do this, you must download and generate MuPDF. This process depends very much
4169

4270
- Now MuPDF can be generated.
4371

44-
* Since PyMuPDF v1.14.17, the sources provided in this repository **no longer contain** the interface files ``fitz.py`` and ``fitz.wrap.c`` - they are generated **"on the fly"** by ``setup.py`` using the interface generator [SWIG](http://www.swig.org/). So you need SWIG being installed on your system. Please refer to issue #312 for a background.
72+
* Since PyMuPDF v1.14.17, the sources provided in this repository **no longer contain** the interface files ``fitz.py`` and ``fitz.wrap.c`` - they are generated **"on the fly"** by ``setup.py`` using the interface generator [SWIG](http://www.swig.org/). So you need SWIG being installed on your system. Please refer to issue #312 for some background.
73+
- PyMuPDF wheels have been generated using **SWIG v4.0.1**.
74+
4575

46-
* If you do **not (want to) use SWIG** for generating PyMuPDF, please download the **sources from PyPI** - they continue to contain the interface files.
47-
- Side note: those files have been generated using **SWIG v4.0.0**, which implements improvements regarding security and also generates a simpler ``fitz.py``. Our wheels are based on this SWIG version, too.
76+
* If you do **not (want to) use SWIG** for generating PyMuPDF, please download the **sources from PyPI** - they continue to contain the generated interface files, and installation should work like any other generation of Python extensions for your system.
4877

4978
Once this is done, adjust directories in ``setup.py`` and run ``python setup.py install``.
5079

@@ -61,33 +90,8 @@ Then you might need to ``export ARCHFLAGS='-arch x86_64'``, since ``libmupdf.a``
6190
Finally, please double check ``setup.py`` before building. Update ``include_dirs`` and ``library_dirs`` if necessary.
6291

6392
## MS Windows
64-
6593
If you are looking to make your own binary, consult this [Wiki page](https://github.com/pymupdf/PyMuPDF/wiki/Windows-Binaries-Generation). It explains how to use Visual Studio for generating MuPDF in quite some detail.
6694

67-
# Usage and Documentation
68-
For all document types you can render pages in raster (PNG) or vector (SVG) formats, extract text and images, and access meta information, links, annotations and bookmarks, as well as decrypt the document.
69-
70-
For PDF files, most of these objects can also be created, modified or deleted. Plus you can rotate, re-arrange, duplicate, create, delete and split or join **pages** and you can **join or split PDF** documents.
71-
72-
Specifically for **PDF files**, PyMuPDF also provides update access to **low-level structure** data, supports handling of embedded files and modification of **page contents** (like inserting images, fonts, text, annotations and drawings).
73-
74-
Other features include embedding vector images (SVG, PDF) such as logos or watermarks, "posterizing" a PDF or creating "booklet" and "4-up" versions.
75-
76-
You can also create and update **Form PDFs** and **form fields** with support for text, checkbox, listbox and combobox widgets.
77-
78-
Starting with version 1.16.0, PDF password protection is **fully supported**: passwords, encryption methods and permission levels can be set, changed or removed.
79-
80-
To some degree, PyMuPDF can also be used as an [image converter](https://github.com/pymupdf/PyMuPDF/wiki/How-to-Convert-Images): it can read a broad range of input formats and can produce **Portable Network Graphics (PNG)**, **Portable Anymaps** (**PNM**, etc.), **Portable Arbitrary Maps (PAM)**, **Adobe Postscript** and **Adobe Photoshop** documents, making the use of other graphics packages obselete in many cases. But interfacing with e.g. PIL/Pillow for image input and output is easy as well.
81-
82-
Have a look at the basic [demos](https://github.com/pymupdf/PyMuPDF/tree/master/demo), the [examples](https://github.com/pymupdf/PyMuPDF/tree/master/examples) (which contain complete, working programs), and the **recipes** section of our [Wiki](https://github.com/pymupdf/PyMuPDF/wiki) sidebar, which contains more than a dozen of guides in How-To-style.
83-
84-
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.
85-
86-
* You can view it online at [Read the Docs](https://pymupdf.readthedocs.io/). For **best quality downloads** you should however use the following links.
87-
* zipped [HTML](https://github.com/pymupdf/PyMuPDF/tree/master/doc/html.zip)
88-
* [Windows CHM](https://github.com/pymupdf/PyMuPDF-optional-material/tree/master/doc/PyMuPDF.chm)
89-
* [PDF](https://github.com/pymupdf/PyMuPDF/blob/master/doc/PyMuPDF.pdf)
90-
9195
# Earlier Versions
9296
Earlier versions are available in the [releases](https://github.com/pymupdf/PyMuPDF/releases) directory.
9397

doc/PyMuPDF.pdf

6.82 KB
Binary file not shown.

doc/html.zip

14.9 KB
Binary file not shown.

fitz/__init__.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from __future__ import absolute_import
1+
from __future__ import absolute_import, print_function
22
import sys
33
from fitz.fitz import *
44

@@ -15,10 +15,13 @@
1515
fitz.TOOLS = TOOLS
1616

1717
if fitz.VersionFitz != fitz.TOOLS.mupdf_version():
18-
raise ValueError(
19-
"MuPDF library mismatch %s <> %s"
20-
% (fitz.VersionFitz, fitz.TOOLS.mupdf_version())
21-
)
18+
v1 = fitz.VersionFitz.split(".")
19+
v2 = fitz.TOOLS.mupdf_version().split(".")
20+
if v1[:-1] != v2[:-1]:
21+
raise ValueError(
22+
"MuPDF library mismatch %s <> %s"
23+
% (fitz.VersionFitz, fitz.TOOLS.mupdf_version())
24+
)
2225

2326

2427
# copy functions to their respective fitz classes

0 commit comments

Comments
 (0)