Skip to content

Commit

Permalink
upload v1.18.3
Browse files Browse the repository at this point in the history
  • Loading branch information
JorjMcKie committed Nov 9, 2020
1 parent 0e6be18 commit c207aaa
Show file tree
Hide file tree
Showing 23 changed files with 1,239 additions and 281 deletions.
6 changes: 3 additions & 3 deletions PKG-INFO
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: PyMuPDF
Version: 1.18.2
Version: 1.18.3
Author: Jorj McKie
Author-email: jorj.x.mckie@outlook.de
Maintainer: Jorj McKie
Expand All @@ -9,7 +9,7 @@ Home-page: https://github.com/pymupdf/PyMuPDF
Download-url: https://github.com/pymupdf/PyMuPDF
Summary: PyMuPDF is a Python binding for the PDF rendering library MuPDF
Description:
Release date: October 7, 2020
Release date: November 9, 2020

Authors
=======
Expand All @@ -20,7 +20,7 @@ Description:
Introduction
============

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

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.

Expand Down
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
# PyMuPDF 1.18.2
# PyMuPDF 1.18.3

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

Release date: October 27, 2020
Release date: November 9, 2020

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

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

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

# Authors
* [Jorj X. McKie](mailto:jorj.x.mckie@outlook.de)
* [Ruikai Liu](mailto:lrk700@gmail.com)

# Introduction

This is **version 1.18.2 of PyMuPDF**, a Python binding with support for [MuPDF 1.18.*](http://mupdf.com/) - "a lightweight PDF, XPS, and E-book viewer".
This is **version 1.18.3 of PyMuPDF**, a Python binding with support for [MuPDF 1.18.*](http://mupdf.com/) - "a lightweight PDF, XPS, and E-book viewer".

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.

Expand All @@ -30,7 +31,7 @@ For all supported document types (i.e. **_including images_**) you can
* extract text and images
* convert to other formats: PDF, (X)HTML, XML, JSON, text

> 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, including SVG, and can produce **Portable Network Graphics (PNG)**, **Portable Anymaps** (**PNM**, etc.), **Portable Arbitrary Maps (PAM)**, **Scalable Vector Graphics (SVG)**, **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.
> 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.
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).

Expand Down
18 changes: 16 additions & 2 deletions docs/annot.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,24 +15,26 @@ There is a parent-child relationship between an annotation and its page. If the
**Attribute** **Short Description**
=============================== ==============================================================
:meth:`Annot.blendMode` return the annotation's blend mode
:meth:`Annot.setBlendMode` set the annotation's blend mode
:meth:`Annot.delete_responses` delete all responding annotions
:meth:`Annot.fileGet` return attached file content
:meth:`Annot.soundGet` return the sound of an audio annotation
:meth:`Annot.fileInfo` return attached file information
:meth:`Annot.fileUpd` set attached file new content
:meth:`Annot.getOC` return xref of an optional content group
:meth:`Annot.getPixmap` image of the annotation as a pixmap
:meth:`Annot.getText` extract annotation text
:meth:`Annot.getTextbox` extract annotation text
:meth:`Annot.setBlendMode` set the annotation's blend mode
:meth:`Annot.setBorder` change the border
:meth:`Annot.setColors` change the colors
:meth:`Annot.setFlags` change the flags
:meth:`Annot.setInfo` change various properties
:meth:`Annot.setLineEnds` set line ending styles
:meth:`Annot.setName` change the "Name" field (e.g. icon name)
:meth:`Annot.setOC` set visibility via an optional content group (OCG)
:meth:`Annot.setOpacity` change transparency
:meth:`Annot.setRect` change the rectangle
:meth:`Annot.setRotation` change rotation
:meth:`Annot.soundGet` return the sound of an audio annotation
:meth:`Annot.update` apply accumulated annot changes
:attr:`Annot.border` border details
:attr:`Annot.colors` border / background and fill colors
Expand Down Expand Up @@ -141,6 +143,18 @@ There is a parent-child relationship between an annotation and its page. If the
:arg int start: The symbol number for the first point.
:arg int end: The symbol number for the last point.

.. method:: setOC(xref)

Set the annotation's visibility using optional content groups. This visibility can be controlled by user interfaces provided by supporting PDF viewers and is independent from other parameters like ::attr:`Annot.flags`.

:arg int xref: :data:`xref` of an optional contents group (OCG). If zero, any previous enty will be removed. An exception occurs if the xref does not point to a valid PDF object.

.. method:: getOC()

Return the :data:`xref` of an optional content group, or zero if there is none.

:returns: zero or the xref of an OCG (or OCMD).

.. method:: setOpacity(value)

Set the annotation's transparency. Opacity can also be set in :meth:`Annot.update`.
Expand Down
1 change: 1 addition & 0 deletions docs/app2.rst
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,7 @@ preserve ligatures 1 1 1 1 1 1 1 1
preserve whitespace 1 1 1 1 1 1 1 1
preserve images n/a 1 1 n/a 1 1 n/a 0
inhibit spaces 0 0 0 0 0 0 0 0
dehyphenate 0 0 0 0 0 0 0 0
=================== ==== ==== ===== === ==== ======= ===== ======

* **"json"** is handled exactly like **"dict"** and is hence left out.
Expand Down
15 changes: 14 additions & 1 deletion docs/changes.rst
Original file line number Diff line number Diff line change
@@ -1,9 +1,22 @@
Change Logs
===============

Changes in Version 1.18.3
---------------------------
As a major new feature, this version introduces support for PDF's **Optional Content** concept.

* **Fixed** issue `#714 <https://github.com/pymupdf/PyMuPDF/issues/714>`_.
* **Fixed** issue `#711 <https://github.com/pymupdf/PyMuPDF/issues/711>`_.

* **Fixed** issue `#707 <https://github.com/pymupdf/PyMuPDF/issues/707>`_: if a PDF user password is supplied but no owner password is supplied nor present, then the user password is also used as the owner password.
* **Fixed** ``expand`` and ``deflate`` parameters of methods :meth:`Document.save` and :meth:`Document.write`. Individual image and font compression should now finally work. Addresses issue `#713 <https://github.com/pymupdf/PyMuPDF/issues/713>`_.
* **Added** a support of PDF optional content. This includes several new :ref:`Document` methods for inquiring and setting optional content status and adding optional content configurations and groups. In addition, images, form XObjects and annotations now can be bound to optional content specifications. **Resolved** issue `#709 <https://github.com/pymupdf/PyMuPDF/issues/709>`_.



Changes in Version 1.18.2
---------------------------
This version contains some interesting improvements for text searching: any number of search hits is now returned thanks to the removal of the **hit_max** parameter. The new **clip** parameter in addition allows to restrict the search area. Searching now detects hyphenations at line breaks and accordingly finds hyphenated words.
This version contains some interesting improvements for text searching: any number of search hits is now returned and the **hit_max** parameter was removed. The new **clip** parameter in addition allows to restrict the search area. Searching now detects hyphenations at line breaks and accordingly finds hyphenated words.

* **Fixed** issue `#575 <https://github.com/pymupdf/PyMuPDF/issues/575>`_: if using ``quads=False`` in text searching, then overlapping rectangles on the same line are joined. Previously, parts of the search string, which belonged to different "marked content" items, each generated their own rectangle -- just as if occurring on separate lines.
* **Added** :attr:`Document.isRepaired`, which is true if the PDF was repaired on open.
Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
# built documents.
#
# The full version, including alpha/beta/rc tags.
release = "1.18.2"
release = "1.18.3"

# The short X.Y version
version = release
Expand Down
3 changes: 0 additions & 3 deletions docs/device.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,3 @@ The different format handlers (pdf, xps, etc.) interpret pages to a "device". De
:type textpage: :ref:`TextPage`

:arg int flags: control the way how text is parsed into the text page. Currently 3 options can be coded into this parameter, see :ref:`TextPreserve`. To set these options use something like *flags=0 | TEXT_PRESERVE_LIGATURES | ...*.

.. note:: In higher level code (:meth:`Page.getText`, :meth:`Document.getPageText`), the following decisions for creating text devices have been implemented: (1) *TEXT_PRESERVE_LIGATURES* and *TEXT_PRESERVE_WHITESPACES* are always set, (2) *TEXT_PRESERVE_IMAGES* is set for JSON and HTML, otherwise off.

Loading

0 comments on commit c207aaa

Please sign in to comment.