Skip to content

Commit 723765c

Browse files
committed
Fix #170 and minor enhancements
1 parent 0e2b471 commit 723765c

14 files changed

+346
-509
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
# PyMuPDF 1.13.3 [![Build Status](https://travis-ci.org/rk700/PyMuPDF.svg?branch=master)](https://travis-ci.org/rk700/PyMuPDF)
1+
# PyMuPDF 1.13.4 [![Build Status](https://travis-ci.org/rk700/PyMuPDF.svg?branch=master)](https://travis-ci.org/rk700/PyMuPDF)
22

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

5-
Release date: April 23, 2018
5+
Release date: May 11, 2018
66

77
# Authors
88
* [Ruikai Liu](mailto:[email protected])
99
* [Jorj X. McKie](mailto:[email protected])
1010

1111
# Introduction
1212

13-
This is **version 1.13.3 of PyMuPDF (formerly python-fitz)**, a Python binding with support for [MuPDF 1.13.0](http://mupdf.com/) - "a lightweight PDF and XPS viewer".
13+
This is **version 1.13.4 of PyMuPDF (formerly python-fitz)**, a Python binding with support for [MuPDF 1.13.0](http://mupdf.com/) - "a lightweight PDF and XPS viewer".
1414

1515
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.
1616

doc/PyMuPDF.pdf

10.9 KB
Binary file not shown.

doc/html.zip

4.62 KB
Binary file not shown.

fitz/_mupdf_config.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@
8181
#define TOFU_SIL // <=== PyMuPDF
8282

8383
/* To skip the ICC profiles, enable: */
84-
// #define NO_ICC
84+
#define NO_ICC // <=== PyMuPDF
8585

8686
/* To skip the Base14 fonts, enable: */
8787
/* #define TOFU_BASE14 */

fitz/fitz.i

Lines changed: 78 additions & 75 deletions
Large diffs are not rendered by default.

fitz/fitz.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,9 @@ class _object:
102102

103103

104104
VersionFitz = "1.13.0"
105-
VersionBind = "1.13.3"
106-
VersionDate = "2018-05-03 15:12:04"
107-
version = (VersionBind, VersionFitz, "20180503151204")
105+
VersionBind = "1.13.4"
106+
VersionDate = "2018-05-11 12:57:42"
107+
version = (VersionBind, VersionFitz, "20180511125742")
108108

109109

110110
#------------------------------------------------------------------------------
@@ -642,12 +642,12 @@ def embeddedFileAdd(self, buffer, name, filename=None, desc=None):
642642
return _fitz.Document_embeddedFileAdd(self, buffer, name, filename, desc)
643643

644644

645-
def convertToPDF(self):
646-
"""convertToPDF(self) -> PyObject *"""
645+
def convertToPDF(self, from_page=0, to_page=-1, rotate=0):
646+
"""Convert document to PDF selecting copy range and optional rotation. Output bytes object."""
647647
if self.isClosed:
648648
raise ValueError("operation illegal for closed doc")
649649

650-
return _fitz.Document_convertToPDF(self)
650+
return _fitz.Document_convertToPDF(self, from_page, to_page, rotate)
651651

652652
@property
653653

@@ -889,7 +889,7 @@ def extractFont(self, xref=0, info_only=0):
889889

890890

891891
def extractImage(self, xref=0):
892-
"""extractImage(self, xref=0) -> PyObject *"""
892+
"""Extract image an xref points to. Return dict of extension and image content"""
893893
if self.isClosed:
894894
raise ValueError("operation illegal for closed doc")
895895

@@ -1152,7 +1152,7 @@ def loadLinks(self):
11521152
@property
11531153

11541154
def firstAnnot(self):
1155-
"""firstAnnot points to first annot on page"""
1155+
"""Points to first annotation on page"""
11561156
CheckParent(self)
11571157

11581158
val = _fitz.Page_firstAnnot(self)
@@ -1259,7 +1259,7 @@ def _showPDFpage(self, rect, docsrc, pno=0, overlay=1, keep_proportion=1, reuse_
12591259

12601260

12611261
def insertImage(self, rect, filename=None, pixmap=None, stream=None, overlay=1):
1262-
"""Insert a new image in a rectangle."""
1262+
"""Insert a new image into a rectangle."""
12631263
CheckParent(self)
12641264

12651265
return _fitz.Page_insertImage(self, rect, filename, pixmap, stream, overlay)

0 commit comments

Comments
 (0)