mirror of
https://github.com/ocrmypdf/OCRmyPDF.git
synced 2025-11-02 02:40:44 +00:00
parent
3546f84c6d
commit
b70863b47e
@ -14,7 +14,6 @@ from PIL import Image
|
||||
import re, sys
|
||||
import argparse
|
||||
|
||||
|
||||
def monkeypatch_method(cls):
|
||||
'''
|
||||
Override a class method at runtime.
|
||||
@ -47,8 +46,13 @@ def PIL_imagedata(self):
|
||||
|
||||
from reportlab.lib.utils import import_zlib
|
||||
from reportlab import rl_config
|
||||
from reportlab.pdfbase.pdfutils import _AsciiBase85Encode, _chunker
|
||||
|
||||
from reportlab.pdfbase.pdfutils import _chunker
|
||||
# in order to support both newer and older versions of reportlab
|
||||
try:
|
||||
from reportlab.pdfbase.pdfutils import _AsciiBase85Encode
|
||||
except ImportError:
|
||||
from reportlab.pdfbase.pdfutils import _asciiBase85Encode as _AsciiBase85Encode
|
||||
|
||||
self.source = 'PIL'
|
||||
zlib = import_zlib()
|
||||
if not zlib:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user