PyMuPDF 1.12.5__tar.gz → 1.14.19__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- PyMuPDF-1.14.19/PKG-INFO +74 -0
- PyMuPDF-1.14.19/fitz/__init__.py +85 -0
- PyMuPDF-1.14.19/fitz/fitz.py +5054 -0
- PyMuPDF-1.14.19/fitz/fitz_wrap.c +23288 -0
- {PyMuPDF-1.12.5 → PyMuPDF-1.14.19}/fitz/utils.py +1223 -1112
- PyMuPDF-1.14.19/setup.py +87 -0
- PyMuPDF-1.12.5/PKG-INFO +0 -67
- PyMuPDF-1.12.5/fitz/__init__.py +0 -171
- PyMuPDF-1.12.5/fitz/fitz.py +0 -2718
- PyMuPDF-1.12.5/fitz/fitz_wrap.c +0 -18943
- PyMuPDF-1.12.5/setup.py +0 -80
PyMuPDF-1.14.19/PKG-INFO
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
Metadata-Version: 1.1
|
|
2
|
+
Name: PyMuPDF
|
|
3
|
+
Version: 1.14.19
|
|
4
|
+
Summary: Python bindings for the PDF rendering library MuPDF
|
|
5
|
+
Home-page: https://github.com/pymupdf/PyMuPDF
|
|
6
|
+
Author: Jorj McKie, Ruikai Liu
|
|
7
|
+
Author-email: jorj.x.mckie@outlook.de
|
|
8
|
+
License: UNKNOWN
|
|
9
|
+
Description: Release date: July 18, 2019
|
|
10
|
+
|
|
11
|
+
Authors
|
|
12
|
+
=======
|
|
13
|
+
|
|
14
|
+
* Ruikai Liu
|
|
15
|
+
* Jorj X. McKie
|
|
16
|
+
|
|
17
|
+
Introduction
|
|
18
|
+
============
|
|
19
|
+
|
|
20
|
+
This is **version 1.14.19 of PyMuPDF**, a Python binding for `MuPDF <http://mupdf.com/>`_ - "a lightweight PDF and XPS viewer".
|
|
21
|
+
|
|
22
|
+
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.
|
|
23
|
+
|
|
24
|
+
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.
|
|
25
|
+
|
|
26
|
+
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.
|
|
27
|
+
|
|
28
|
+
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.
|
|
29
|
+
|
|
30
|
+
Installation
|
|
31
|
+
============
|
|
32
|
+
|
|
33
|
+
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. 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.
|
|
34
|
+
|
|
35
|
+
Usage and Documentation
|
|
36
|
+
========================
|
|
37
|
+
|
|
38
|
+
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, most of 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.
|
|
39
|
+
|
|
40
|
+
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). When saving changes to password protected PDFs you can now choose, whether to keep or remove encryption.
|
|
41
|
+
|
|
42
|
+
Other features include embedding vector images (SVG, PDF) such as logos or watermarks, joining or splitting single PDF pages (including things like posterizing and 2-up / 4-up processing).
|
|
43
|
+
|
|
44
|
+
You can now also create **PDF Form fields** with support for text, checkbox, listbox and combobox widgets.
|
|
45
|
+
|
|
46
|
+
Our home page provides many examples and How-Tos for all of this. At a minimum, read the tutorial and the the recipes sections of our documentation.
|
|
47
|
+
|
|
48
|
+
Written using **Sphinx**, documentation is available here:
|
|
49
|
+
|
|
50
|
+
* View it online at `Read The Docs <https://pymupdf.readthedocs.io/en/latest/>`_. For **best quality downloads**, use the following links.
|
|
51
|
+
|
|
52
|
+
* `HTML <https://github.com/pymupdf/PyMuPDF/tree/master/doc/html.zip>`_
|
|
53
|
+
|
|
54
|
+
* `Windows CHM <https://github.com/JorjMcKie/PyMuPDF-optional-material/tree/master/doc/PyMuPDF.chm>`_
|
|
55
|
+
|
|
56
|
+
* `PDF <https://github.com/pymupdf/PyMuPDF/tree/master/doc/pymupdf.pdf>`_
|
|
57
|
+
|
|
58
|
+
Platform: UNKNOWN
|
|
59
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
60
|
+
Classifier: Environment :: Console
|
|
61
|
+
Classifier: Intended Audience :: Developers
|
|
62
|
+
Classifier: License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)
|
|
63
|
+
Classifier: License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
|
|
64
|
+
Classifier: Operating System :: MacOS
|
|
65
|
+
Classifier: Operating System :: Microsoft :: Windows
|
|
66
|
+
Classifier: Operating System :: POSIX :: Linux
|
|
67
|
+
Classifier: Programming Language :: C
|
|
68
|
+
Classifier: Programming Language :: Python :: 2.7
|
|
69
|
+
Classifier: Programming Language :: Python :: 3
|
|
70
|
+
Classifier: Programming Language :: Python :: 3.4
|
|
71
|
+
Classifier: Programming Language :: Python :: 3.5
|
|
72
|
+
Classifier: Programming Language :: Python :: 3.6
|
|
73
|
+
Classifier: Programming Language :: Python :: 3.7
|
|
74
|
+
Classifier: Topic :: Utilities
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
from __future__ import absolute_import
|
|
2
|
+
from fitz.fitz import *
|
|
3
|
+
|
|
4
|
+
# 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
|
|
11
|
+
|
|
12
|
+
# create the TOOLS object
|
|
13
|
+
TOOLS = fitz.Tools()
|
|
14
|
+
fitz.TOOLS = TOOLS
|
|
15
|
+
|
|
16
|
+
if fitz.VersionFitz != fitz.TOOLS.mupdf_version():
|
|
17
|
+
raise ValueError(
|
|
18
|
+
"MuPDF library mismatch %s <> %s"
|
|
19
|
+
% (fitz.VersionFitz, fitz.TOOLS.mupdf_version())
|
|
20
|
+
)
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
# copy functions to their respective fitz classes
|
|
24
|
+
import fitz.utils
|
|
25
|
+
|
|
26
|
+
# ------------------------------------------------------------------------------
|
|
27
|
+
# Document
|
|
28
|
+
# ------------------------------------------------------------------------------
|
|
29
|
+
fitz.open = fitz.Document
|
|
30
|
+
fitz.Document.getToC = fitz.utils.getToC
|
|
31
|
+
fitz.Document._do_links = fitz.utils.do_links
|
|
32
|
+
fitz.Document.getPagePixmap = fitz.utils.getPagePixmap
|
|
33
|
+
fitz.Document.getPageText = fitz.utils.getPageText
|
|
34
|
+
fitz.Document.setMetadata = fitz.utils.setMetadata
|
|
35
|
+
fitz.Document.setToC = fitz.utils.setToC
|
|
36
|
+
fitz.Document.searchPageFor = fitz.utils.searchPageFor
|
|
37
|
+
fitz.Document.newPage = fitz.utils.newPage
|
|
38
|
+
fitz.Document.insertPage = fitz.utils.insertPage
|
|
39
|
+
fitz.Document.getCharWidths = fitz.utils.getCharWidths
|
|
40
|
+
|
|
41
|
+
# ------------------------------------------------------------------------------
|
|
42
|
+
# Page
|
|
43
|
+
# ------------------------------------------------------------------------------
|
|
44
|
+
fitz.Page.drawBezier = fitz.utils.drawBezier
|
|
45
|
+
fitz.Page.drawCircle = fitz.utils.drawCircle
|
|
46
|
+
fitz.Page.drawCurve = fitz.utils.drawCurve
|
|
47
|
+
fitz.Page.drawLine = fitz.utils.drawLine
|
|
48
|
+
fitz.Page.drawOval = fitz.utils.drawOval
|
|
49
|
+
fitz.Page.drawPolyline = fitz.utils.drawPolyline
|
|
50
|
+
fitz.Page.drawRect = fitz.utils.drawRect
|
|
51
|
+
fitz.Page.drawQuad = fitz.utils.drawQuad
|
|
52
|
+
fitz.Page.drawSector = fitz.utils.drawSector
|
|
53
|
+
fitz.Page.drawSquiggle = fitz.utils.drawSquiggle
|
|
54
|
+
fitz.Page.drawZigzag = fitz.utils.drawZigzag
|
|
55
|
+
fitz.Page.getTextBlocks = fitz.utils.getTextBlocks
|
|
56
|
+
fitz.Page.getTextWords = fitz.utils.getTextWords
|
|
57
|
+
fitz.Page.getLinks = fitz.utils.getLinks
|
|
58
|
+
fitz.Page.getPixmap = fitz.utils.getPixmap
|
|
59
|
+
fitz.Page.getText = fitz.utils.getText
|
|
60
|
+
fitz.Page.insertLink = fitz.utils.insertLink
|
|
61
|
+
fitz.Page.insertTextbox = fitz.utils.insertTextbox
|
|
62
|
+
fitz.Page.insertText = fitz.utils.insertText
|
|
63
|
+
fitz.Page.searchFor = fitz.utils.searchFor
|
|
64
|
+
fitz.Page.showPDFpage = fitz.utils.showPDFpage
|
|
65
|
+
fitz.Page.insertImage = fitz.utils.insertImage
|
|
66
|
+
fitz.Page.updateLink = fitz.utils.updateLink
|
|
67
|
+
fitz.Page.newShape = lambda x: fitz.utils.Shape(x)
|
|
68
|
+
|
|
69
|
+
# ------------------------------------------------------------------------------
|
|
70
|
+
# Rect
|
|
71
|
+
# ------------------------------------------------------------------------------
|
|
72
|
+
fitz.Rect.getRectArea = fitz.utils.getRectArea
|
|
73
|
+
fitz.Rect.getArea = fitz.utils.getRectArea
|
|
74
|
+
|
|
75
|
+
# ------------------------------------------------------------------------------
|
|
76
|
+
# IRect
|
|
77
|
+
# ------------------------------------------------------------------------------
|
|
78
|
+
fitz.IRect.getRectArea = fitz.utils.getRectArea
|
|
79
|
+
fitz.IRect.getArea = fitz.utils.getRectArea
|
|
80
|
+
|
|
81
|
+
fitz.__doc__ = "PyMuPDF %s: Python bindings for the MuPDF %s library,\nbuilt on %s" % (
|
|
82
|
+
fitz.VersionBind,
|
|
83
|
+
fitz.VersionFitz,
|
|
84
|
+
fitz.VersionDate,
|
|
85
|
+
)
|