Skip to content

Commit ef8e246

Browse files
committed
Uploading v1.13.16
1 parent 18116fb commit ef8e246

16 files changed

+636
-320
lines changed

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# PyMuPDF 1.13.15
1+
# PyMuPDF 1.13.16
22

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

@@ -13,7 +13,7 @@ On **[PyPI](https://pypi.org/project/PyMuPDF)** since August 2015: [![](http://p
1313

1414
# Introduction
1515

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

1818
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.
1919

doc/PyMuPDF.pdf

7.03 KB
Binary file not shown.

doc/html.zip

6.56 KB
Binary file not shown.

fitz/fitz.i

+155-50
Large diffs are not rendered by default.

fitz/fitz.py

+41-16
Original file line numberDiff line numberDiff line change
@@ -95,16 +95,31 @@ class _object:
9595
pass
9696
_newclass = 0
9797

98+
FZ_PLOTTERS_G = _fitz.FZ_PLOTTERS_G
99+
FZ_PLOTTERS_RGB = _fitz.FZ_PLOTTERS_RGB
100+
FZ_PLOTTERS_CMYK = _fitz.FZ_PLOTTERS_CMYK
101+
FZ_PLOTTERS_N = _fitz.FZ_PLOTTERS_N
102+
FZ_ENABLE_PDF = _fitz.FZ_ENABLE_PDF
103+
FZ_ENABLE_XPS = _fitz.FZ_ENABLE_XPS
104+
FZ_ENABLE_SVG = _fitz.FZ_ENABLE_SVG
105+
FZ_ENABLE_CBZ = _fitz.FZ_ENABLE_CBZ
106+
FZ_ENABLE_IMG = _fitz.FZ_ENABLE_IMG
107+
FZ_ENABLE_TIFF = _fitz.FZ_ENABLE_TIFF
108+
FZ_ENABLE_HTML = _fitz.FZ_ENABLE_HTML
109+
FZ_ENABLE_EPUB = _fitz.FZ_ENABLE_EPUB
110+
FZ_ENABLE_GPRF = _fitz.FZ_ENABLE_GPRF
111+
FZ_ENABLE_JPX = _fitz.FZ_ENABLE_JPX
112+
FZ_ENABLE_JS = _fitz.FZ_ENABLE_JS
98113

99114
import weakref
100115
from binascii import hexlify
101116
import math
102117

103118

104119
VersionFitz = "1.13.0"
105-
VersionBind = "1.13.15"
106-
VersionDate = "2018-07-25 23:50:27"
107-
version = (VersionBind, VersionFitz, "20180725235027")
120+
VersionBind = "1.13.16"
121+
VersionDate = "2018-08-01 13:43:15"
122+
version = (VersionBind, VersionFitz, "20180801134315")
108123

109124

110125
#------------------------------------------------------------------------------
@@ -640,6 +655,8 @@ def _make_line_AP(annot, nv = None, r0 = None):
640655
w = annot.border["width"] # get line width
641656
sc = annot.colors["stroke"] # get stroke color
642657
fc = annot.colors["fill"] # get fill color
658+
ca = annot.opacity # get opacity value
659+
Alp0 = "/Alp0 gs\n" if ca >= 0 else ""
643660
vert = nv if nv else annot.vertices # get list of points
644661
rn = r0 if r0 else annot.rect
645662
h = rn.height # annot rectangle height
@@ -658,7 +675,7 @@ def _make_line_AP(annot, nv = None, r0 = None):
658675
dtab = "".join(dtab)
659676

660677
# start /AP string with a goto command
661-
ap = "q\n%g %g m\n" % (vert[0][0] - x0, h - (vert[0][1] - y0))
678+
ap = "q\n%s%g %g m\n" % (Alp0, vert[0][0] - x0, h - (vert[0][1] - y0))
662679

663680
# add line commands for all subsequent points
664681
for v in vert[1:]:
@@ -718,6 +735,8 @@ def _make_rect_AP(annot):
718735
w = annot.border["width"] # get line width
719736
sc = annot.colors["stroke"] # get stroke color
720737
fc = annot.colors["fill"] # get fill color
738+
ca = annot.opacity # get opacity value
739+
Alp0 = "/Alp0 gs\n" if ca >= 0 else ""
721740
scol = "%g %g %g RG " % (sc[0], sc[1], sc[2]) if sc else "0 0 0 RG "
722741
fcol = "%g %g %g rg " % (fc[0], fc[1], fc[2]) if fc else ""
723742
dt = annot.border.get("dashes")
@@ -731,7 +750,7 @@ def _make_rect_AP(annot):
731750
r1 = r2 = w/2. # rect starts bottom-left here
732751
r3 = r.width - w # rect width reduced by line width
733752
r4 = r.height - w # rect height reduced by line with
734-
ap = "q\n%g %g %g %g re %g w 1 J 1 j\n" % (r1, r2, r3, r4, w)
753+
ap = "q\n%s%g %g %g %g re %g w 1 J 1 j\n" % (Alp0, r1, r2, r3, r4, w)
735754
ap += scol + fcol + dtab
736755
if fcol:
737756
ap += "\nb\nQ\n"
@@ -762,6 +781,8 @@ def _make_circle_AP(annot):
762781
sc = annot.colors["stroke"]
763782
scol = "%g %g %g RG " % (sc[0], sc[1], sc[2]) if sc else "0 0 0 RG "
764783
fc = annot.colors["fill"]
784+
ca = annot.opacity # get opacity value
785+
Alp0 = "/Alp0 gs\n" if ca >= 0 else ""
765786
fcol = "%g %g %g rg " % (fc[0], fc[1], fc[2]) if fc else ""
766787
dt = annot.border.get("dashes")
767788
dtab = []
@@ -775,7 +796,7 @@ def _make_circle_AP(annot):
775796
h = annot.rect.height
776797
r = Rect(lw2, lw2, annot.rect.width - lw2, h - lw2)
777798

778-
ap = "q\n" + _oval_string(h, r.tl, r.tr, r.br, r.bl)
799+
ap = "q\n" + Alp0 + _oval_string(h, r.tl, r.tr, r.br, r.bl)
779800
ap += "%g w 1 J 1 j\n" % lw
780801
ap += scol + fcol + dtab
781802
if fcol:
@@ -2095,9 +2116,9 @@ def _cleanContents(self):
20952116
return _fitz.Page__cleanContents(self)
20962117

20972118

2098-
def _showPDFpage(self, rect, docsrc, pno=0, overlay=1, keep_proportion=1, reuse_xref=0, clip=None, graftmap=None):
2099-
"""_showPDFpage(self, rect, docsrc, pno=0, overlay=1, keep_proportion=1, reuse_xref=0, clip=None, graftmap=None) -> int"""
2100-
return _fitz.Page__showPDFpage(self, rect, docsrc, pno, overlay, keep_proportion, reuse_xref, clip, graftmap)
2119+
def _showPDFpage(self, rect, docsrc, pno=0, overlay=1, keep_proportion=1, reuse_xref=0, clip=None, graftmap=None, _imgname=None):
2120+
"""_showPDFpage(self, rect, docsrc, pno=0, overlay=1, keep_proportion=1, reuse_xref=0, clip=None, graftmap=None, _imgname=None) -> int"""
2121+
return _fitz.Page__showPDFpage(self, rect, docsrc, pno, overlay, keep_proportion, reuse_xref, clip, graftmap, _imgname)
21012122

21022123

21032124
def insertImage(self, rect, filename=None, pixmap=None, stream=None, overlay=1, _imgname=None):
@@ -2106,7 +2127,7 @@ def insertImage(self, rect, filename=None, pixmap=None, stream=None, overlay=1,
21062127
CheckParent(self)
21072128
imglst = self.parent.getPageImageList(self.number)
21082129
ilst = [i[7] for i in imglst]
2109-
n = "fitzImg"
2130+
n = "fzImg"
21102131
i = 0
21112132
_imgname = n + "0"
21122133
while _imgname in ilst:
@@ -3330,7 +3351,10 @@ def setOpacity(self, opacity):
33303351
"""setOpacity(self, opacity)"""
33313352
CheckParent(self)
33323353

3333-
return _fitz.Annot_setOpacity(self, opacity)
3354+
val = _fitz.Annot_setOpacity(self, opacity)
3355+
_upd_my_AP(self)
3356+
3357+
return val
33343358

33353359
@property
33363360

@@ -3834,6 +3858,12 @@ def store_maxsize(self):
38343858
"""Maximum store size."""
38353859
return _fitz.Tools_store_maxsize(self)
38363860

3861+
@property
3862+
3863+
def fitz_config(self):
3864+
"""Show configuration data."""
3865+
return _fitz.Tools_fitz_config(self)
3866+
38373867

38383868
def _store_debug(self):
38393869
"""_store_debug(self)"""
@@ -3845,11 +3875,6 @@ def glyph_cache_empty(self):
38453875
return _fitz.Tools_glyph_cache_empty(self)
38463876

38473877

3848-
def font_config(self):
3849-
"""font_config(self) -> PyObject *"""
3850-
return _fitz.Tools_font_config(self)
3851-
3852-
38533878
def __init__(self):
38543879
"""__init__(self) -> Tools"""
38553880
this = _fitz.new_Tools()

0 commit comments

Comments
 (0)