From 3f9adcd5e0a47bd3b20c39ee23a9b56420ed3090 Mon Sep 17 00:00:00 2001 From: "James R. Barlow" Date: Thu, 19 Jan 2017 16:48:05 -0800 Subject: [PATCH] Document idea for producing companion text files --- docs/cookbook.rst | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/docs/cookbook.rst b/docs/cookbook.rst index 86c11563..6ff427a8 100644 --- a/docs/cookbook.rst +++ b/docs/cookbook.rst @@ -62,6 +62,17 @@ By default OCRmyPDF assumes the document is English. Language packs must be installed for all languages specified. See :ref:`Installing additional language packs `. +Produce PDF and text file containing OCR text +""""""""""""""""""""""""""""""""""""""""""""" + +This produces a file named "output.pdf" and a companion text file named "output.txt". The ``pdftotext`` program from +`Poppler `_ is used to extract text from the finished PDF. + +.. code-block:: bash + + ocrmypdf input.pdf - | tee output.pdf | pdftotext - output.txt + + OCR images, not PDFs --------------------