Skip to content

Commit c28ee1b

Browse files
authored
Merge pull request #260 from JorjMcKie/master
Upgrade to v1.14.9
2 parents 5e778a5 + 37922f8 commit c28ee1b

File tree

14 files changed

+625
-357
lines changed

14 files changed

+625
-357
lines changed

.travis.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,21 +23,20 @@ matrix:
2323
HAVE_GLFW=no HAVE_GLUT=no prefix=/usr/local install && cd .."
2424
- export CIBW_ENVIRONMENT='CFLAGS="-fPIC -std=gnu99"'
2525
- os: osx
26-
osx_image: xcode8.3
2726
language: generic
2827
services:
2928
- docker
3029
env: PIP=pip3
3130
before_install:
32-
- brew update -q
31+
- brew update
3332
- brew outdated python || brew upgrade python
3433
- sudo mkdir -p /usr/local/man && sudo chmod a+rw /usr/local/man
3534
before_script:
3635
- export CIBW_BEFORE_BUILD="cd mupdf && make HAVE_X11=no HAVE_GLFW=no HAVE_GLUT=no
3736
prefix=/usr/local install && cd .."
3837
- export CIBW_ENVIRONMENT='CFLAGS=-fPIC'
3938
install:
40-
- "$PIP install cibuildwheel==0.10.0"
39+
- "$PIP install cibuildwheel==0.10.1"
4140
- mkdir mupdf && wget -q $MUPDF -O - | tar zx -C mupdf --strip-components=1
4241
- cp fitz/_mupdf_config.h mupdf/include/mupdf/fitz/config.h
4342
- cp fitz/_pdf-device.c mupdf/source/pdf/pdf-device.c

PKG-INFO

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
Metadata-Version: 1.1
22
Name: PyMuPDF
3-
Version: 1.14.8
3+
Version: 1.14.9
44
Author: Ruikai Liu
55
Author-email: [email protected]
6-
Maintainer: Ruikai Liu
7-
Maintainer-email: [email protected]
8-
Home-page: https://github.com/rk700/PyMuPDF
9-
Download-url: https://github.com/rk700/PyMuPDF
6+
Maintainer: Jorj X. McKie
7+
Maintainer-email: [email protected]
8+
Home-page: https://github.com/pymupdf/PyMuPDF
9+
Download-url: https://github.com/pymupdf/PyMuPDF
1010
Summary: PyMuPDF is a Python binding for the PDF rendering library MuPDF
1111
Description:
1212

13-
Release date: January 31, 2019
13+
Release date: March 6, 2019
1414

1515
Authors
1616
=======
@@ -21,20 +21,20 @@ Description:
2121
Introduction
2222
============
2323

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

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

2828
With PyMuPDF you therefore can access files with extensions ``*.pdf``, ``*.xps``, ``*.oxps``, ``*.epub``, ``*.cbz`` or ``*.fb2`` from your Python scripts. A number of popular image formats is supported as well, including multi-page TIFF images.
2929

3030
PyMuPDF should run on all platforms that are supported by both, MuPDF and Python. These include, but are not limited to, Windows (XP/SP2 and up), Mac OS and Linux, 32-bit or 64-bit. If you can generate MuPDF on a Python supported platform, then also PyMuPDF can be used there.
3131

32-
PyMuPDF is hosted on `GitHub <https://github.com/rk700/PyMuPDF>`_ where you find up-to-date information of its features, our `issue tracker <https://github.com/rk700/PyMuPDF/issues>`_, `Wikis <https://github.com/rk700/PyMuPDF/wiki>`_ and much more.
32+
PyMuPDF is hosted on `GitHub <https://github.com/pymupdf/PyMuPDF>`_ where you find up-to-date information of its features, our `issue tracker <https://github.com/pymupdf/PyMuPDF/issues>`_, `Wikis <https://github.com/pymupdf/PyMuPDF/wiki>`_ and much more.
3333

3434
Installation
3535
============
3636

37-
For all MS Windows versions as well as popular Max OS and Linux versions, we are providing Python wheels - see the download section of this site and the current `release directory <https://github.com/rk700/PyMuPDF/releases/latest>`_ of our home page. For Windows users, `zip-based installation <https://github.com/JorjMcKie/PyMuPDF-Optional-Material>`_ options are also available. Other platforms need to download and generate the MuPDF library first and then set up PyMuPDF. Do visit our GitHub home, which has more details on this, including latest bugfixes, pre-releases, etc.
37+
For all MS Windows versions as well as popular Max OS and Linux versions, we are providing Python wheels - see the download section of this site and the current `release directory <https://github.com/pymupdf/PyMuPDF/releases/latest>`_ of our home page. For Windows users, `zip-based installation <https://github.com/JorjMcKie/PyMuPDF-Optional-Material>`_ options are also available. Other platforms need to download and generate the MuPDF library first and then set up PyMuPDF. Do visit our GitHub home, which has more details on this, including latest bugfixes, pre-releases, etc.
3838

3939
Usage and Documentation
4040
========================
@@ -53,11 +53,11 @@ Description:
5353

5454
* View it online at `Read The Docs <https://pymupdf.readthedocs.io/en/latest/>`_. For **best quality downloads**, use the following links.
5555

56-
* `HTML <https://github.com/rk700/PyMuPDF/tree/master/doc/html.zip>`_
56+
* `HTML <https://github.com/pymupdf/PyMuPDF/tree/master/doc/html.zip>`_
5757

5858
* `Windows CHM <https://github.com/JorjMcKie/PyMuPDF-optional-material/tree/master/doc/PyMuPDF.chm>`_
5959

60-
* `PDF <https://github.com/rk700/PyMuPDF/tree/master/doc/pymupdf.pdf>`_
60+
* `PDF <https://github.com/pymupdf/PyMuPDF/tree/master/doc/pymupdf.pdf>`_
6161

6262

6363
Classifier: Development Status :: 5 - Production/Stable

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# PyMuPDF 1.14.8
1+
# PyMuPDF 1.14.9
22

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

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

1515
# Introduction
1616

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

demo/piechart1.pdf

94 Bytes
Binary file not shown.

fitz/__init__.py

Lines changed: 59 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -2,76 +2,82 @@
22
from fitz.fitz import *
33

44
# define the supported colorspaces for convenience
5-
fitz.csRGB = fitz.Colorspace(fitz.CS_RGB)
6-
fitz.csGRAY = fitz.Colorspace(fitz.CS_GRAY)
7-
fitz.csCMYK = fitz.Colorspace(fitz.CS_CMYK)
8-
csRGB = fitz.csRGB
9-
csGRAY = fitz.csGRAY
10-
csCMYK = fitz.csCMYK
5+
fitz.csRGB = fitz.Colorspace(fitz.CS_RGB)
6+
fitz.csGRAY = fitz.Colorspace(fitz.CS_GRAY)
7+
fitz.csCMYK = fitz.Colorspace(fitz.CS_CMYK)
8+
csRGB = fitz.csRGB
9+
csGRAY = fitz.csGRAY
10+
csCMYK = fitz.csCMYK
1111

1212
# create the TOOLS object
13-
TOOLS = fitz.Tools()
14-
fitz.TOOLS = TOOLS
13+
TOOLS = fitz.Tools()
14+
fitz.TOOLS = TOOLS
1515

1616
if fitz.VersionFitz != fitz.TOOLS.mupdf_version():
17-
raise ValueError("MuPDF library mismatch %s <> %s" % (fitz.VersionFitz, fitz.TOOLS.mupdf_version()))
17+
raise ValueError(
18+
"MuPDF library mismatch %s <> %s"
19+
% (fitz.VersionFitz, fitz.TOOLS.mupdf_version())
20+
)
1821

1922
import fitz.utils
2023

2124
# copy functions to their respective fitz classes
2225

23-
#------------------------------------------------------------------------------
26+
# ------------------------------------------------------------------------------
2427
# Document
25-
#------------------------------------------------------------------------------
26-
fitz.open = fitz.Document
27-
fitz.Document.getToC = fitz.utils.getToC
28-
fitz.Document._do_links = fitz.utils.do_links
28+
# ------------------------------------------------------------------------------
29+
fitz.open = fitz.Document
30+
fitz.Document.getToC = fitz.utils.getToC
31+
fitz.Document._do_links = fitz.utils.do_links
2932
fitz.Document.getPagePixmap = fitz.utils.getPagePixmap
30-
fitz.Document.getPageText = fitz.utils.getPageText
31-
fitz.Document.setMetadata = fitz.utils.setMetadata
32-
fitz.Document.setToC = fitz.utils.setToC
33+
fitz.Document.getPageText = fitz.utils.getPageText
34+
fitz.Document.setMetadata = fitz.utils.setMetadata
35+
fitz.Document.setToC = fitz.utils.setToC
3336
fitz.Document.searchPageFor = fitz.utils.searchPageFor
34-
fitz.Document.newPage = fitz.utils.newPage
37+
fitz.Document.newPage = fitz.utils.newPage
3538
fitz.Document.getCharWidths = fitz.utils.getCharWidths
3639

37-
#------------------------------------------------------------------------------
40+
# ------------------------------------------------------------------------------
3841
# Page
39-
#------------------------------------------------------------------------------
40-
fitz.Page.drawBezier = fitz.utils.drawBezier
41-
fitz.Page.drawCircle = fitz.utils.drawCircle
42-
fitz.Page.drawCurve = fitz.utils.drawCurve
43-
fitz.Page.drawLine = fitz.utils.drawLine
44-
fitz.Page.drawOval = fitz.utils.drawOval
45-
fitz.Page.drawPolyline = fitz.utils.drawPolyline
46-
fitz.Page.drawRect = fitz.utils.drawRect
47-
fitz.Page.drawQuad = fitz.utils.drawQuad
48-
fitz.Page.drawSector = fitz.utils.drawSector
49-
fitz.Page.drawSquiggle = fitz.utils.drawSquiggle
50-
fitz.Page.drawZigzag = fitz.utils.drawZigzag
51-
fitz.Page.getTextBlocks = fitz.utils.getTextBlocks
52-
fitz.Page.getTextWords = fitz.utils.getTextWords
53-
fitz.Page.getLinks = fitz.utils.getLinks
54-
fitz.Page.getPixmap = fitz.utils.getPixmap
55-
fitz.Page.getText = fitz.utils.getText
56-
fitz.Page.insertLink = fitz.utils.insertLink
57-
fitz.Page.insertTextbox = fitz.utils.insertTextbox
58-
fitz.Page.insertText = fitz.utils.insertText
59-
fitz.Page.searchFor = fitz.utils.searchFor
60-
fitz.Page.showPDFpage = fitz.utils.showPDFpage
61-
fitz.Page.updateLink = fitz.utils.updateLink
62-
fitz.Page.newShape = lambda x: fitz.utils.Shape(x)
42+
# ------------------------------------------------------------------------------
43+
fitz.Page.drawBezier = fitz.utils.drawBezier
44+
fitz.Page.drawCircle = fitz.utils.drawCircle
45+
fitz.Page.drawCurve = fitz.utils.drawCurve
46+
fitz.Page.drawLine = fitz.utils.drawLine
47+
fitz.Page.drawOval = fitz.utils.drawOval
48+
fitz.Page.drawPolyline = fitz.utils.drawPolyline
49+
fitz.Page.drawRect = fitz.utils.drawRect
50+
fitz.Page.drawQuad = fitz.utils.drawQuad
51+
fitz.Page.drawSector = fitz.utils.drawSector
52+
fitz.Page.drawSquiggle = fitz.utils.drawSquiggle
53+
fitz.Page.drawZigzag = fitz.utils.drawZigzag
54+
fitz.Page.getTextBlocks = fitz.utils.getTextBlocks
55+
fitz.Page.getTextWords = fitz.utils.getTextWords
56+
fitz.Page.getLinks = fitz.utils.getLinks
57+
fitz.Page.getPixmap = fitz.utils.getPixmap
58+
fitz.Page.getText = fitz.utils.getText
59+
fitz.Page.insertLink = fitz.utils.insertLink
60+
fitz.Page.insertTextbox = fitz.utils.insertTextbox
61+
fitz.Page.insertText = fitz.utils.insertText
62+
fitz.Page.searchFor = fitz.utils.searchFor
63+
fitz.Page.showPDFpage = fitz.utils.showPDFpage
64+
fitz.Page.updateLink = fitz.utils.updateLink
65+
fitz.Page.newShape = lambda x: fitz.utils.Shape(x)
6366

64-
#------------------------------------------------------------------------------
67+
# ------------------------------------------------------------------------------
6568
# Rect
66-
#------------------------------------------------------------------------------
67-
fitz.Rect.getRectArea = fitz.utils.getRectArea
68-
fitz.Rect.getArea = fitz.utils.getRectArea
69+
# ------------------------------------------------------------------------------
70+
fitz.Rect.getRectArea = fitz.utils.getRectArea
71+
fitz.Rect.getArea = fitz.utils.getRectArea
6972

70-
#------------------------------------------------------------------------------
73+
# ------------------------------------------------------------------------------
7174
# IRect
72-
#------------------------------------------------------------------------------
73-
fitz.IRect.getRectArea = fitz.utils.getRectArea
74-
fitz.IRect.getArea = fitz.utils.getRectArea
75+
# ------------------------------------------------------------------------------
76+
fitz.IRect.getRectArea = fitz.utils.getRectArea
77+
fitz.IRect.getArea = fitz.utils.getRectArea
7578

76-
fitz.__doc__ = "PyMuPDF %s: Python bindings for the MuPDF %s library,\nbuilt on %s" \
77-
% (fitz.VersionBind, fitz.VersionFitz, fitz.VersionDate)
79+
fitz.__doc__ = "PyMuPDF %s: Python bindings for the MuPDF %s library,\nbuilt on %s" % (
80+
fitz.VersionBind,
81+
fitz.VersionFitz,
82+
fitz.VersionDate,
83+
)

0 commit comments

Comments
 (0)