From 539f0ee0ce7f670824a30b6e772d8238584e70b8 Mon Sep 17 00:00:00 2001 From: "James R. Barlow" Date: Tue, 3 Oct 2023 23:54:24 -0700 Subject: [PATCH] Document some missing CLI options to API --- README.md | 4 ++-- src/ocrmypdf/api.py | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 54eac522..8c28ffaf 100644 --- a/README.md +++ b/README.md @@ -39,8 +39,8 @@ ocrmypdf # it's a scriptable command line program - Distributes work across all available CPU cores - Uses [Tesseract OCR](https://github.com/tesseract-ocr/tesseract) engine to recognize more than [100 languages](https://github.com/tesseract-ocr/tessdata) - Keeps your private data private. -- Scales properly to handle files with thousands of pages -- Battle-tested on millions of PDFs +- Scales properly to handle files with thousands of pages. +- Battle-tested on millions of PDFs. Demo of OCRmyPDF in a terminal session diff --git a/src/ocrmypdf/api.py b/src/ocrmypdf/api.py index c731d25c..07191d96 100644 --- a/src/ocrmypdf/api.py +++ b/src/ocrmypdf/api.py @@ -241,6 +241,7 @@ def ocr( # noqa: D417 png_quality: int | None = None, jbig2_lossy: bool | None = None, jbig2_page_group_size: int | None = None, + jbig2_threshold: float | None = None, pages: str | None = None, max_image_mpixels: float | None = None, tesseract_config: Iterable[str] | None = None, @@ -250,12 +251,16 @@ def ocr( # noqa: D417 pdf_renderer: str | None = None, tesseract_timeout: float | None = None, tesseract_non_ocr_timeout: float | None = None, + tesseract_downsample_above: int | None = None, + tesseract_downsample_large_images: bool | None = None, rotate_pages_threshold: float | None = None, pdfa_image_compression: str | None = None, + color_conversion_strategy: str | None = None, user_words: os.PathLike | None = None, user_patterns: os.PathLike | None = None, fast_web_view: float | None = None, continue_on_soft_render_error: bool | None = None, + invalidate_digital_signatures: bool | None = None, plugins: Iterable[StrPath] | None = None, plugin_manager=None, keep_temporary_files: bool | None = None,