From a60ea72517d398712671205dcc3dc15453f2812e Mon Sep 17 00:00:00 2001 From: "James R. Barlow" Date: Mon, 4 Jul 2022 23:01:20 -0700 Subject: [PATCH] docs: improve remarks about lossy JBIG2 and lossy image transformations --- docs/advanced.rst | 4 +++- docs/cookbook.rst | 8 ++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/docs/advanced.rst b/docs/advanced.rst index 0e7b93ae..76e012cb 100644 --- a/docs/advanced.rst +++ b/docs/advanced.rst @@ -223,7 +223,9 @@ The ``hocr`` renderer The ``hocr`` renderer works with older versions of Tesseract. The image layer is copied from the original PDF page if possible, avoiding potentially lossy transcoding or loss of other PDF information. If -preprocessing is specified, then the image layer is a new PDF. +preprocessing is specified, then the image layer is a new PDF. (You may +need to disable PDF/A conversion nad optimization to eliminate all +lossy transformations.) Unlike ``sandwich`` this renderer is implemented within OCRmyPDF; anyone looking to customize how OCR is presented should look here. A major diff --git a/docs/cookbook.rst b/docs/cookbook.rst index 23ccc8cf..58b535d6 100644 --- a/docs/cookbook.rst +++ b/docs/cookbook.rst @@ -340,6 +340,9 @@ levels in the GCC compiler. - Enables lossless optimizations, such as transcoding images to more efficient formats. Also compress other uncompressed objects in the PDF and enables the more efficient "object streams" within the PDF. + (If ``--jbig2-lossy`` is issued, then lossy JBIG2 optimization is used. + The decision to use lossy JBIG2 is separate from standard optimization + settings.) * - ``--optimize 2`` - All of the above, and enables lossy optimizations and color quantization. * - ``--optimize 3`` @@ -360,3 +363,8 @@ fo a PDF. ocrmypdf --optimize 3 in.pdf out.pdf # Make it small Some users may consider enabling lossy JBIG2. See: :ref:`jbig2-lossy`. + +.. note:: + + Image processing and PDF/A conversion can also introduce lossy transformations + to your PDF images, even when ``--optimize 1`` is in use.