diff --git a/src/ocrmypdf/_pipeline.py b/src/ocrmypdf/_pipeline.py index eef05497..ff4e60dc 100644 --- a/src/ocrmypdf/_pipeline.py +++ b/src/ocrmypdf/_pipeline.py @@ -593,9 +593,9 @@ def select_ocr_image( bbox = textarea xscale, yscale = float(xres) / 72.0, float(yres) / 72.0 pixcoords = [bbox[0] * xscale, - im.height - bbox[1] * yscale, + im.height - bbox[3] * yscale, bbox[2] * xscale, - im.height - bbox[3] * yscale] + im.height - bbox[1] * yscale] pixcoords = [int(round(c)) for c in pixcoords] log.debug('blanking %r', pixcoords) draw.rectangle(pixcoords, fill=white)