Skip to content

Commit ce9551e

Browse files
committed
upload v1.18.1
1 parent 56fce5b commit ce9551e

18 files changed

+503
-289
lines changed

README.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,17 +62,16 @@ Our **documentation**, written using Sphinx, is available in various formats fro
6262
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.
6363

6464
> 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.
65-
> Starting immediately, we **_defer uploading_** Python 2.7 / 3.5 wheels. Please submit an issue to request one of them.
65+
> Starting immediately, we **_defer uploading Python 2.7 / 3.5 wheels_** until explicitely requested. Please submit an issue.
6666
6767
If your platform is not supported with one of our wheels, you need to generate PyMuPDF yourself as follows. This requires the development version of Python.
6868

6969
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:
7070

7171
* 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.
7272

73-
* 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:
74-
- 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.
75-
- font support file `_pdf-font-add.c` copy-replace to: `mupdf/source/pdf/pdf-font-add.c`.
73+
* 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 potentially other fixes. Copy-rename each of them to their correct target location within the downloaded MuPDF source. Currently, these files are:
74+
- **Optional:** 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. If omitting this change, the binary extension module will be over 30 MB (compared to around 11 MB). Does not impact functionality.
7675

7776
- Now MuPDF can be generated.
7877

docs/annot.rst

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ There is a parent-child relationship between an annotation and its page. If the
1818
:meth:`Annot.setBlendMode` set the annotation's blend mode
1919
:meth:`Annot.delete_responses` delete all responding annotions
2020
:meth:`Annot.fileGet` return attached file content
21+
:meth:`Annot.soundGet` return the sound of an audio annotation
2122
:meth:`Annot.fileInfo` return attached file information
2223
:meth:`Annot.fileUpd` set attached file new content
2324
:meth:`Annot.getPixmap` image of the annotation as a pixmap
@@ -310,9 +311,28 @@ There is a parent-child relationship between an annotation and its page. If the
310311

311312
:arg str desc: new description of the file content.
312313

314+
.. method:: soundGet()
315+
316+
Return the embedded sound of an audio annotation.
317+
318+
:rtype: dict
319+
:returns: the sound audio file and accompanying properties. These are the possible dictionary keys, of which "rate" and "stream" are always present.
320+
321+
=========== =======================================================
322+
Key Description
323+
=========== =======================================================
324+
rate (float, requ.) samples per second
325+
channels (int, opt.) number of sound channels
326+
bps (int, opt.) bits per sample value per channel
327+
encoding (str, opt.) encoding format: Raw, Signed, muLaw, ALaw
328+
compression (str, opt.) name of compression filter
329+
stream (bytes, requ.) the sound file content
330+
=========== =======================================================
331+
332+
313333
.. attribute:: opacity
314334

315-
The annotation's transparency. If set, it is a value in range *[0, 1]*. The PDF default is *1.0*. However, in an effort to tell the difference, we return *-1.0* if not set.
335+
The annotation's transparency. If set, it is a value in range *[0, 1]*. The PDF default is 1. However, in an effort to tell the difference, we return *-1.0* if not set.
316336

317337
:rtype: float
318338

docs/changes.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
Change Logs
22
===============
33

4+
Changes in Version 1.18.1
5+
---------------------------
6+
* **Fixed** issue `#692 <https://github.com/pymupdf/PyMuPDF/issues/692>`_. PyMuPDF now detects and recovers from more cyclic resource dependencies in PDF pages and for the first time reports them in the MuPDF warnings store.
7+
* **Fixed** issue `#686 <https://github.com/pymupdf/PyMuPDF/issues/686>`_.
8+
* **Added** opacity options for the :ref:`Shape` class: Stroke and fill colors can now be set to some transparency value. This means that all :ref:`Page` draw methods, methods :meth:`Page.insertText`, :meth:`Page.insertTextbox`, :meth:`Shape.finish`, :meth:`Shape.insertText`, and :meth:`Shape.insertTextbox` support two new parameters: *stroke_opacity* and *fill_opacity*.
9+
* **Added** new parameter ``mask`` to :meth:`Page.insertImage` for optionally providing an external image mask. Resolves issue `#685 <https://github.com/pymupdf/PyMuPDF/issues/685>`_.
10+
* **Added** :meth:`Annot.soundGet` for extracting the sound of an audio annotation.
11+
412
Changes in Version 1.18.0
513
---------------------------
614
This is first PyMuPDF version supporting MuPDF v1.18. The goal here is on extending PyMuPDF's own functionality -- apart from bug fixing. Subsequent PyMuPDF patches may address features new in MuPDF.

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
# built documents.
4141
#
4242
# The full version, including alpha/beta/rc tags.
43-
release = "1.18.0"
43+
release = "1.18.1"
4444

4545
# The short X.Y version
4646
version = release

docs/installation.rst

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ On occasion, vital hot fixes or functional enhancements must be applied to MuPDF
2525

2626
Any such files are contained in the *fitz* directory of the `PyMuPDF homepage <https://github.com/pymupdf/PyMuPDF/tree/master/fitz>`_ -- their names all start with an underscore *"_"*. Currently (v1.16.x), these files and their copy destinations are the following:
2727

28-
* *_config.h* -- PyMuPDF's configuration to control the binary file size and the inclusion of MuPDF features, see next section. This file must renamed and replace MuPDF file */include/mupdf/fitz/config.h*. This file controls the size of the PyMuPDF binary by cutting away unneeded fonts from MuPDF.
28+
* *_config.h* -- **(Optional)** PyMuPDF's configuration to control the binary file size. Copy-rename it to */include/mupdf/fitz/config.h*. This reduces the size of the PyMuPDF binary extension module to around 11 MB. If omitting this change, that size will be over 30 MB -- without impacting functionality.
2929

3030
**Generate MuPDF**
3131

@@ -37,7 +37,7 @@ Step 3: Build / Setup PyMuPDF
3737
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3838
Adjust the setup.py script as necessary. E.g. make sure that:
3939

40-
* the include directory is correctly set in sync with your directory structure
40+
* the include directories are correctly set in sync with your directory structure
4141
* the object code libraries are correctly defined
4242

4343
Now perform a *python setup.py install*.
@@ -50,9 +50,11 @@ Now perform a *python setup.py install*.
5050
Option 2: Install from Binaries
5151
--------------------------------
5252
You can install PyMuPDF from Python wheels. The wheels are *self-contained*, i.e. you will **not need any other software** nor download / install MuPDF to run PyMuPDF scripts.
53-
This installation option is available for all MS Windows and the most **popular 64-bit** Mac OSX and Linux platforms for Python versions 2.7 and 3.5 through 3.8.
53+
This installation option is available for all MS Windows and the most **popular 64-bit** Mac OSX and Linux platforms for Python versions 3.6 through 3.9.
5454
Windows binaries are provided for Python **32-bit and 64-bit** versions.
5555

56+
.. note:: For the time being, wheels for Python versions 2.7 and 3.5 are generated as well, but not uploaded to PyPI until explicitely requested via an issue. Starting year 2021, support for these wheel versions will be dropped entirely.
57+
5658
**Overview of wheel names (PyMuPDF version is x.xx.xx):**
5759

5860
.. literalinclude:: wheelnames.txt

0 commit comments

Comments
 (0)