diff --git a/docs/cookbook.rst b/docs/cookbook.rst index 29adf198..2e7a0237 100644 --- a/docs/cookbook.rst +++ b/docs/cookbook.rst @@ -213,4 +213,6 @@ Currently optimization attempts to find more efficient encodings for images. The .. code-block:: bash - ocrmypdf --optimize 3 in.pdf out.pdf # Make it as small as possible + ocrmypdf --optimize 3 in.pdf out.pdf # Make it small + +Some users may consider enabling lossy JBIG2. See: :ref:`jbig2-lossy`. diff --git a/docs/jbig2.rst b/docs/jbig2.rst index acbfd1a1..8c781c48 100644 --- a/docs/jbig2.rst +++ b/docs/jbig2.rst @@ -20,3 +20,16 @@ For all other Linux, you must build a JBIG2 encoder from source: ./autogen.sh ./configure && make [sudo] make install + +.. _jbig2-lossy: + +Lossy mode JBIG2 +---------------- + +OCRmyPDF provides lossy mode JBIG2 as an advanced feature. Users should `review the technical concerns with JBIG2 in lossy mode `_ and decide if this feature is acceptable for their use case. + +JBIG2 lossy mode does achieve higher compression ratios than any other monochrome (bitonal) compression technology; for large text documents the savings are considerable. JBIG2 lossless still gives great compression ratios and is a major improvement over the older CCITT G4 standard. As explained above, there is some risk of substitution errors. + +To turn on JBIG2 lossy mode, add the argument ``--jbig2-lossy``. ``--optimize {1,2,3}`` are necessary for the argument to take effect also required. Also, a JBIG2 encoder must be installed as described in the previous section. + +*ocrmypdf v7.0 and v7.1 used lossy mode by default.*