Skip to content

Commit

Permalink
Fix #170 and minor enhancements
Browse files Browse the repository at this point in the history
  • Loading branch information
JorjMcKie committed May 11, 2018
1 parent 0e2b471 commit 723765c
Show file tree
Hide file tree
Showing 14 changed files with 346 additions and 509 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
# PyMuPDF 1.13.3 [![Build Status](https://travis-ci.org/rk700/PyMuPDF.svg?branch=master)](https://travis-ci.org/rk700/PyMuPDF)
# PyMuPDF 1.13.4 [![Build Status](https://travis-ci.org/rk700/PyMuPDF.svg?branch=master)](https://travis-ci.org/rk700/PyMuPDF)

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

Release date: April 23, 2018
Release date: May 11, 2018

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

# Introduction

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".
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".

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 Down
Binary file modified doc/PyMuPDF.pdf
Binary file not shown.
Binary file modified doc/html.zip
Binary file not shown.
2 changes: 1 addition & 1 deletion fitz/_mupdf_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
#define TOFU_SIL // <=== PyMuPDF

/* To skip the ICC profiles, enable: */
// #define NO_ICC
#define NO_ICC // <=== PyMuPDF

/* To skip the Base14 fonts, enable: */
/* #define TOFU_BASE14 */
Expand Down
153 changes: 78 additions & 75 deletions fitz/fitz.i

Large diffs are not rendered by default.

18 changes: 9 additions & 9 deletions fitz/fitz.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,9 @@ class _object:


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


#------------------------------------------------------------------------------
Expand Down Expand Up @@ -642,12 +642,12 @@ def embeddedFileAdd(self, buffer, name, filename=None, desc=None):
return _fitz.Document_embeddedFileAdd(self, buffer, name, filename, desc)


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

return _fitz.Document_convertToPDF(self)
return _fitz.Document_convertToPDF(self, from_page, to_page, rotate)

@property

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


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

Expand Down Expand Up @@ -1152,7 +1152,7 @@ def loadLinks(self):
@property

def firstAnnot(self):
"""firstAnnot points to first annot on page"""
"""Points to first annotation on page"""
CheckParent(self)

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


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

return _fitz.Page_insertImage(self, rect, filename, pixmap, stream, overlay)
Expand Down
Loading

0 comments on commit 723765c

Please sign in to comment.