From 345256ee99c5ac6b4de552437c4960782cf96d47 Mon Sep 17 00:00:00 2001 From: Tom Date: Wed, 19 Apr 2017 00:19:24 +0200 Subject: [PATCH] Fix --skip-big when there are no images in pdf (#152) * fixed skip-big when there are no images in pdf * added only_text pdf * updated only_text pdf * Delete only_text.pdf --- ocrmypdf/pipeline.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ocrmypdf/pipeline.py b/ocrmypdf/pipeline.py index 2281115a..ca4edcb3 100644 --- a/ocrmypdf/pipeline.py +++ b/ocrmypdf/pipeline.py @@ -247,7 +247,7 @@ def is_ocr_required(pageinfo, log, options): "skipping all processing on this page")) ocr_required = False - if ocr_required and options.skip_big: + if ocr_required and options.skip_big and pageinfo['images']: pixel_count = pageinfo['width_pixels'] * pageinfo['height_pixels'] if pixel_count > (options.skip_big * 1000000): ocr_required = False