Raise exception if rotate pages threshold adjusted without --rotate-pages

Fixes Make usage of --rotate-pages-threshold clearer #1309
This commit is contained in:
James R. Barlow
2024-05-18 23:49:27 -07:00
parent 28be50136c
commit 26432c38a9
3 changed files with 16 additions and 9 deletions
+2 -1
View File
@@ -9,6 +9,7 @@ import argparse
from collections.abc import Callable, Mapping
from typing import Any, TypeVar
from ocrmypdf._defaults import DEFAULT_ROTATE_PAGES_THRESHOLD
from ocrmypdf._version import PROGRAM_NAME as _PROGRAM_NAME
from ocrmypdf._version import __version__ as _VERSION
@@ -403,7 +404,7 @@ Online documentation is located at:
)
advanced.add_argument(
'--rotate-pages-threshold',
default=14.0,
default=DEFAULT_ROTATE_PAGES_THRESHOLD,
type=numeric(float, 0, 1000),
metavar='CONFIDENCE',
help="Only rotate pages when confidence is above this value (arbitrary "