Skip to content

Commit a43b861

Browse files
committed
upload v1.18.0
1 parent 3f753dc commit a43b861

20 files changed

+1317
-490
lines changed

PKG-INFO

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
Metadata-Version: 1.1
22
Name: PyMuPDF
3-
Version: 1.17.7
4-
Author: Ruikai Liu
5-
Author-email: [email protected]
6-
Maintainer: Jorj X. McKie
3+
Version: 1.18.0
4+
Author: Jorj McKie
5+
Author-email: [email protected]
6+
Maintainer: Jorj McKie
77
Maintainer-email: [email protected]
88
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: September 15, 2020
12+
Release date: October 7, 2020
1313

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

23-
This is **version 1.17.7 of PyMuPDF**, a Python binding for `MuPDF <http://mupdf.com/>`_ - "a lightweight PDF and XPS viewer".
23+
This is **version 1.18.0 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

@@ -40,7 +40,7 @@ Description:
4040

4141
For all document types you can render pages in raster (PNG) or vector (SVG) formats, extract text and access meta information, links, annotations and bookmarks, as well as decrypt the document. For PDF files, these objects can also be created, modified or deleted. Plus you can rotate, re-arrange, duplicate, create, or delete pages and join or split documents.
4242

43-
Starting with version 1.16.0, PDF password protection is **fully supported**: passwords, encryption methods and permission levels can be set, changed or removed.
43+
Since version 1.16.0, PDF password protection is **fully supported**: owner and user passwords, encryption methods and permission levels can be set, changed or removed.
4444

4545
Specifically for PDF files, PyMuPDF provides update access to low-level structure information, supports handling of embedded files and modification of page contents (like inserting images, fonts, text, annotations and drawings).
4646

README.md

+12-21
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
# PyMuPDF 1.17.7
1+
# PyMuPDF 1.18.0
22

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

5-
Release date: September 15, 2020
5+
Release date: October 7, 2020
66

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

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

1515
# Introduction
1616

17-
This is **version 1.17.7 of PyMuPDF**, a Python binding with support for [MuPDF 1.17.*](http://mupdf.com/) - "a lightweight PDF, XPS, and E-book viewer".
17+
This is **version 1.18.0 of PyMuPDF**, a Python binding with support for [MuPDF 1.17.*](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

@@ -34,9 +34,8 @@ For all supported document types (i.e. **_including images_**) you can
3434
3535
For **PDF documents,** there exists a plethorea of additional features: they can be created, joined or split up. Pages can be inserted, deleted, re-arranged or modified in many ways (including annotations and form fields).
3636

37-
* **_NEW:_** Drawings on a PDF page can be extracted. You can now find out, where lines, rectangles or curves have been drawn on the page. This may help detecting the location of tables and text positions. The feature is still in development and can be imported as a separate module from [this](https://github.com/pymupdf/PyMuPDF-Utilities/tree/master/extract-graphics) folder. You will also find detailed documentation there.
3837
* Images and fonts can be extracted or inserted.
39-
> You may want to have a look at [this](https://github.com/pymupdf/PyMuPDF-Utilities/blob/master/examples/image-maintenance.py) cool new GUI example script, which lets you insert, delete, replace or re-position images under your visual control.
38+
> You may want to have a look at [this](https://github.com/pymupdf/PyMuPDF-Utilities/blob/master/examples/image-maintenance.py) cool GUI example script, which lets you insert, delete, replace or re-position images under your visual control.
4039
* Embedded files are fully supported.
4140
* PDFs can be reformatted to support double-sided printing, posterizing, applying logos or watermarks
4241
* Password protection is fully supported: decryption, encryption, encryption method selection, permmission level and user / owner password setting.
@@ -60,32 +59,24 @@ Our **documentation**, written using Sphinx, is available in various formats fro
6059

6160
# Installation
6261

63-
For the major **Windows** and (thanks to our user **@jbarlow83**!) **Mac OSX** or **Linux** versions we provide wheels in the [download section of PyPI](https://pypi.org/project/PyMuPDF/#files). This includes Python 2.7 and versions Python 3.5 through 3.9.
62+
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.
6463

65-
> Starting January 2021, wheels for Python version 2 will no longer be built. You will need to build PyMuPDF for Python 2 from sources as explained below.
66-
> Similarly for Python 3.5: it has reached its end of life on 2020-09-13 and will therefore also no longer be serviced with wheels in 2021.
64+
> Wheels for **Python versions 2.7 and 3.5** will only be produced until the end of this year 2020. After that, you will need to build PyMuPDF from sources as explained below.
6765
68-
For other Python versions or operating systems you need to generate PyMuPDF yourself as follows. This should work for all platforms which support Python and MuPDF. In any case you need the development version of Python.
66+
If your plaform is not supported with one of our wheels, you need to generate PyMuPDF yourself as follows. This requires the development version of Python.
6967

70-
Before building PyMuPDF from sources, you must build MuPDF. This process depends very much on your system. For most platforms, the MuPDF source contains prepared procedures for achieving this. Please observe the following general steps:
68+
Before you can do that, you must first build MuPDF. For most platforms, the MuPDF sources contain prepared procedures for achieving this. Please observe the following general steps:
7169

72-
* Be sure to download the official MuPDF source release from [here](https://mupdf.com/downloads/archive).
70+
* Be sure to download the **_official MuPDF source release_** from [here](https://mupdf.com/downloads/archive). Do not use MuPDF's [GitHub repo](https://github.com/ArtifexSoftware/mupdf). It contains their development source for future versions.
7371

74-
* Do **not use** MuPDF's [GitHub repo](https://github.com/ArtifexSoftware/mupdf). It contains their current **development source**, which is **not compatible** with this PyMuPDF version.
75-
76-
* This repo's `fitz` folder contains one or more files whose names start with a single underscore `"_"`. These files contain configuration data and hotfixes. Each one must be copy-renamed to its correct target location **inside the MuPDF source** that you have downloaded, **before you generate MuPDF**. Currently, these files are:
72+
* This repo's [fitz](https://github.com/pymupdf/PyMuPDF/tree/master/fitz) folder contains one or more files whose names start with a single underscore `"_"`. These files contain configuration data and other fixes or extensions. Each of them must be copy-renamed to their correct target location within the downloaded MuPDF. Currently, these files are:
7773
- fitz configuration file `_config.h` copy-replace to: `mupdf/include/mupdf/fitz/config.h`. It contains configuration data like e.g. which fonts to support.
7874
- font support file `_pdf-font-add.c` copy-replace to: `mupdf/source/pdf/pdf-font-add.c`.
79-
- fax compression file `_encode-fax.c` copy-replace to: `mupdf/source/fitz/encode-fax.c`.
80-
- CLI subtool `_murun.c` copy-replace to: `mupdf/source/tools/murun.c`.
81-
- PDF page cleaning `_pdf_clean.c` copy-replace to: `mupdf/source/pdf/pdf_clean.c`.
82-
- PDF page header `_pdf_page.h` copy-replace to: `mupdf/include/mupdf/pdf/page.h`.
8375

8476
- Now MuPDF can be generated.
8577

86-
* 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 instead 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.
87-
- PyMuPDF wheels have been generated using **SWIG v4.0.1**.
88-
78+
* 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 instead generated **"on the fly"** by ``setup.py`` using the interface generator [SWIG](http://www.swig.org/). So you need SWIG on your system. Please refer to issue #312 for some background.
79+
- PyMuPDF wheels are being generated using **SWIG v4.0.1**.
8980

9081
* If you do **not use SWIG**, please download the **sources from PyPI** - they continue to contain those generated files, so installation should work like any other Python extension generation on your system.
9182

docs/replace-fonts.py

-105
This file was deleted.

fitz/__init__.py

+5
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,11 @@
7878
fitz.Page.updateLink = fitz.utils.updateLink
7979
fitz.Page.writeText = fitz.utils.writeText
8080
# ------------------------------------------------------------------------------
81+
# Annot
82+
# ------------------------------------------------------------------------------
83+
fitz.Annot.getText = fitz.utils.getText
84+
fitz.Annot.getTextbox = fitz.utils.getTextbox
85+
# ------------------------------------------------------------------------------
8186
# Rect
8287
# ------------------------------------------------------------------------------
8388
fitz.Rect.getRectArea = fitz.utils.getRectArea

fitz/_config.h

+15-11
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22

33
#define FZ_CONFIG_H
44

5-
/*
5+
/**
66
Enable the following for spot (and hence overprint/overprint
77
simulation) capable rendering. This forces FZ_PLOTTERS_N on.
88
*/
99
/* #define FZ_ENABLE_SPOT_RENDERING 1 */
1010

11-
/*
11+
/**
1212
Choose which plotters we need.
1313
By default we build all the plotters in. To avoid building
1414
plotters in that aren't needed, define the unwanted
@@ -19,7 +19,7 @@
1919
/* #define FZ_PLOTTERS_CMYK 1 */
2020
/* #define FZ_PLOTTERS_N 1 */
2121

22-
/*
22+
/**
2323
Choose which document agents to include.
2424
By default all are enabled. To avoid building unwanted
2525
ones, define FZ_ENABLE_... to 0.
@@ -32,26 +32,27 @@
3232
/* #define FZ_ENABLE_HTML 1 */
3333
/* #define FZ_ENABLE_EPUB 1 */
3434

35-
/*
35+
/**
3636
Choose whether to enable ICC color profiles.
3737
*/
3838
#define FZ_ENABLE_ICC 1
3939

40-
/*
40+
/**
4141
Choose whether to enable JPEG2000 decoding.
4242
By default, it is enabled, but due to frequent security
4343
issues with the third party libraries we support disabling
4444
it with this flag.
4545
*/
4646
/* #define FZ_ENABLE_JPX 1 */
4747

48-
/*
48+
/**
4949
Choose whether to enable JavaScript.
50-
By default JavaScript is enabled both for mutool and PDF interactivity.
50+
By default JavaScript is enabled both for mutool and PDF
51+
interactivity.
5152
*/
5253
/* #define FZ_ENABLE_JS 1 */
5354

54-
/*
55+
/**
5556
Choose which fonts to include.
5657
By default we include the base 14 PDF fonts,
5758
DroidSansFallback from Android for CJK, and
@@ -62,10 +63,12 @@
6263
/* To avoid all noto fonts except CJK, enable: */
6364
#define TOFU // <=== PyMuPDF: not the complete NOTO!
6465

65-
/* To skip the CJK font, enable: (this implicitly enables TOFU_CJK_EXT and TOFU_CJK_LANG) */
66+
/* To skip the CJK font, enable: (this implicitly enables TOFU_CJK_EXT
67+
* and TOFU_CJK_LANG) */
6668
/* #define TOFU_CJK */
6769

68-
/* To skip CJK Extension A, enable: (this implicitly enables TOFU_CJK_LANG) */
70+
/* To skip CJK Extension A, enable: (this implicitly enables
71+
* TOFU_CJK_LANG) */
6972
#define TOFU_CJK_EXT // <=== PyMuPDF: causes 1.5 MB extra size
7073

7174
/* To skip CJK language specific fonts, enable: */
@@ -85,7 +88,8 @@
8588

8689
/* To skip the Base14 fonts, enable: */
8790
/* #define TOFU_BASE14 */
88-
/* (You probably really don't want to do that except for measurement purposes!) */
91+
/* (You probably really don't want to do that except for measurement
92+
* purposes!) */
8993

9094
/* ---------- DO NOT EDIT ANYTHING UNDER THIS LINE ---------- */
9195

0 commit comments

Comments
 (0)