Skip to content

Commit

Permalink
Make downsampling large images that Tesseract would otherwise error o…
Browse files Browse the repository at this point in the history
…n into default behavior

Fixes #1281
  • Loading branch information
jbarlow83 committed Apr 7, 2024
1 parent b4db1b7 commit 5fdcb76
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/ocrmypdf/builtin_plugins/tesseract_ocr.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

from __future__ import annotations

import argparse
import logging
import os

Expand Down Expand Up @@ -93,7 +94,8 @@ def add_options(parser):
)
tess.add_argument(
'--tesseract-downsample-large-images',
action='store_true',
action=argparse.BooleanOptionalAction,
default=True,
help=(
"Downsample large images before OCR. Tesseract has an upper limit on the "
"size images it will support. If this argument is given, OCRmyPDF will "
Expand Down

0 comments on commit 5fdcb76

Please sign in to comment.