diff --git a/ocrmypdf/hocrtransform.py b/ocrmypdf/hocrtransform.py index dea4306c..893c728b 100755 --- a/ocrmypdf/hocrtransform.py +++ b/ocrmypdf/hocrtransform.py @@ -205,8 +205,8 @@ class HocrTransform(): # put the image on the page, scaled to fill the page if imageFileName is not None: - im = Image.open(imageFileName) - pdf.drawInlineImage(im, 0, 0, width=self.width, height=self.height) + pdf.drawImage(imageFileName, 0, 0, + width=self.width, height=self.height) # finish up the page and save it pdf.showPage() diff --git a/ocrmypdf/pageinfo.py b/ocrmypdf/pageinfo.py index c0c94be1..bb793981 100644 --- a/ocrmypdf/pageinfo.py +++ b/ocrmypdf/pageinfo.py @@ -45,7 +45,6 @@ def _page_has_inline_images(page): data = contents.getData() begin_image, image_data, end_image = False, False, False for data in re.split(b'\s+', data): - print(data) if data == b'BI': begin_image = True elif data == b'ID':