Skip to content

Commit

Permalink
Fix --skip-big when there are no images in pdf (#152)
Browse files Browse the repository at this point in the history
* fixed skip-big when there are no images in pdf

* added only_text pdf

* updated only_text pdf

* Delete only_text.pdf
  • Loading branch information
TomRaz authored and jbarlow83 committed Apr 18, 2017
1 parent 58d1042 commit 345256e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ocrmypdf/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 345256e

Please sign in to comment.