mirror of
https://github.com/ocrmypdf/OCRmyPDF.git
synced 2025-12-01 09:31:06 +00:00
parent
3546f84c6d
commit
b70863b47e
@ -14,7 +14,6 @@ from PIL import Image
|
|||||||
import re, sys
|
import re, sys
|
||||||
import argparse
|
import argparse
|
||||||
|
|
||||||
|
|
||||||
def monkeypatch_method(cls):
|
def monkeypatch_method(cls):
|
||||||
'''
|
'''
|
||||||
Override a class method at runtime.
|
Override a class method at runtime.
|
||||||
@ -47,7 +46,12 @@ def PIL_imagedata(self):
|
|||||||
|
|
||||||
from reportlab.lib.utils import import_zlib
|
from reportlab.lib.utils import import_zlib
|
||||||
from reportlab import rl_config
|
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'
|
self.source = 'PIL'
|
||||||
zlib = import_zlib()
|
zlib = import_zlib()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user