Skip to content

Commit c3995db

Browse files
committed
upload version 1.14.19
1 parent c442ba2 commit c3995db

File tree

7 files changed

+66
-45
lines changed

7 files changed

+66
-45
lines changed

PKG-INFO

Lines changed: 25 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Metadata-Version: 1.1
22
Name: PyMuPDF
3-
Version: 1.14.18
3+
Version: 1.14.19
44
Author: Ruikai Liu
55
Author-email: [email protected]
66
Maintainer: Jorj X. McKie
@@ -9,56 +9,55 @@ 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-
13-
Release date: July 07, 2019
14-
12+
Release date: July 18, 2019
13+
1514
Authors
1615
=======
17-
16+
1817
* Ruikai Liu
1918
* Jorj X. McKie
20-
19+
2120
Introduction
2221
============
23-
24-
This is **version 1.14.18 of PyMuPDF**, a Python binding for `MuPDF <http://mupdf.com/>`_ - "a lightweight PDF and XPS viewer".
25-
22+
23+
This is **version 1.14.19 of PyMuPDF**, a Python binding for `MuPDF <http://mupdf.com/>`_ - "a lightweight PDF and XPS viewer".
24+
2625
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.
27-
26+
2827
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.
29-
28+
3029
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.
31-
30+
3231
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.
33-
32+
3433
Installation
3534
============
36-
35+
3736
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.
38-
37+
3938
Usage and Documentation
4039
========================
41-
40+
4241
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.
43-
42+
4443
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.
45-
44+
4645
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).
47-
46+
4847
You can now also create **PDF Form fields** with support for text, checkbox, listbox and combobox widgets.
49-
48+
5049
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.
51-
50+
5251
Written using **Sphinx**, documentation is available here:
53-
52+
5453
* View it online at `Read The Docs <https://pymupdf.readthedocs.io/en/latest/>`_. For **best quality downloads**, use the following links.
55-
54+
5655
* `HTML <https://github.com/pymupdf/PyMuPDF/tree/master/doc/html.zip>`_
57-
56+
5857
* `Windows CHM <https://github.com/JorjMcKie/PyMuPDF-optional-material/tree/master/doc/PyMuPDF.chm>`_
59-
58+
6059
* `PDF <https://github.com/pymupdf/PyMuPDF/tree/master/doc/pymupdf.pdf>`_
61-
60+
6261

6362
Classifier: Development Status :: 5 - Production/Stable
6463
Classifier: Environment :: Console

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
# PyMuPDF 1.14.18
1+
# PyMuPDF 1.14.19
22

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

5-
Release date: Juli 17, 2019
5+
Release date: Juli 18, 2019
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.14.18 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.19 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

doc/PyMuPDF.pdf

-7.36 KB
Binary file not shown.

doc/html.zip

1.49 KB
Binary file not shown.

fitz/fitz.i

Lines changed: 33 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ from __future__ import division, print_function
105105
# endif
106106

107107
// define Python None object
108-
#define NONE Py_NONE
108+
#define NONE Py_None
109109

110110
#include <fitz.h>
111111
#include <pdf.h>
@@ -1669,6 +1669,30 @@ if len(pyliste) == 0 or min(pyliste) not in range(len(self)) or max(pyliste) not
16691669
return JM_BOOL(pdf_obj_num_is_stream(gctx, pdf, xref));
16701670
}
16711671
1672+
//---------------------------------------------------------------------
1673+
// Check: is this an AcroForm with at least one field?
1674+
//---------------------------------------------------------------------
1675+
CLOSECHECK0(getSigFlags)
1676+
int getSigFlags()
1677+
{
1678+
pdf_document *pdf = pdf_specifics(gctx, $self);
1679+
if (!pdf) return -1; // not a PDF
1680+
int sigflag;
1681+
fz_try(gctx)
1682+
{
1683+
pdf_obj *sigflags = pdf_dict_getl(gctx,
1684+
pdf_trailer(gctx, pdf),
1685+
PDF_NAME(Root),
1686+
PDF_NAME(AcroForm),
1687+
PDF_NAME(SigFlags),
1688+
NULL);
1689+
if (sigflags) sigflag = pdf_to_int(gctx, sigflags);
1690+
else sigflag = -1;
1691+
}
1692+
fz_catch(gctx) return -1; // any problem yields -1
1693+
return sigflag;
1694+
}
1695+
16721696
//---------------------------------------------------------------------
16731697
// Check: is this an AcroForm with at least one field?
16741698
//---------------------------------------------------------------------
@@ -1678,21 +1702,19 @@ if len(pyliste) == 0 or min(pyliste) not in range(len(self)) or max(pyliste) not
16781702
{
16791703
pdf_document *pdf = pdf_specifics(gctx, $self);
16801704
if (!pdf) Py_RETURN_FALSE; // not a PDF
1681-
pdf_obj *form = NULL;
1682-
pdf_obj *fields = NULL;
16831705
int have_form = 0; // preset indicator
16841706
fz_try(gctx)
16851707
{
1686-
form = pdf_dict_getl(gctx, pdf_trailer(gctx, pdf), PDF_NAME(Root), PDF_NAME(AcroForm), NULL);
1687-
if (form) // form obj exists
1688-
{
1689-
fields = pdf_dict_get(gctx, form, PDF_NAME(Fields));
1690-
if (fields && pdf_array_len(gctx, fields) > 0) have_form = 1;
1691-
}
1708+
pdf_obj *fields = pdf_dict_getl(gctx,
1709+
pdf_trailer(gctx, pdf),
1710+
PDF_NAME(Root),
1711+
PDF_NAME(AcroForm),
1712+
PDF_NAME(Fields),
1713+
NULL);
1714+
if (fields && pdf_array_len(gctx, fields) > 0) have_form = 1;
16921715
}
16931716
fz_catch(gctx) Py_RETURN_FALSE; // any problem yields false
1694-
if (!have_form) Py_RETURN_FALSE; // no form / no fields
1695-
Py_RETURN_TRUE;
1717+
return JM_BOOL(have_form);
16961718
}
16971719
16981720
//---------------------------------------------------------------------

fitz/version.i

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
%pythoncode %{
22
VersionFitz = "1.14.0"
3-
VersionBind = "1.14.18"
4-
VersionDate = "2019-07-09 04:46:07"
5-
version = (VersionBind, VersionFitz, "20190709044607")
3+
VersionBind = "1.14.19"
4+
VersionDate = "2019-07-18 20:01:17"
5+
version = (VersionBind, VersionFitz, "20190718200117")
66
%}

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,12 +83,12 @@ def run(self):
8383

8484
setup(
8585
name="PyMuPDF",
86-
version="1.14.17",
86+
version="1.14.19",
8787
description="Python bindings for the PDF rendering library MuPDF",
8888
long_description=long_desc,
8989
classifiers=classifier,
9090
url="https://github.com/pymupdf/PyMuPDF",
91-
author="Ruikai Liu, Jorj McKie",
91+
author="Jorj McKie, Ruikai Liu",
9292
author_email="[email protected]",
9393
cmdclass={"build_py": build_ext_first},
9494
ext_modules=[module],

0 commit comments

Comments
 (0)