

To launch OCR, load a document in the viewer and press the OCR button (1). Fot example, to run OCR in Romanian, I copied rom.lng and ron_pxvocr.dat from one of those two folders. You need to copy both files to ocrdats folder. You will get two folders ( code:SetAppFolder|inst and code:SetEditorFolder|inst) with identical content. Here is what I did with the EU language pack:
#LINUX OCR PDF TO TEXT INSTALL#
Instead install innoextract package and extract it. Don't launch it because it will not install. If you want additional languages, extract the Additional language packs archive. Additional OCR languages: choose a package that contains the language(s) you are interested in.
#LINUX OCR PDF TO TEXT PORTABLE#

This is a free PDF reader with a lot of other functions provided by Tracker Software. The result will be input_document_ocr.pdf in the same folder as the initial document. The availability of languages depends on installed tesseract-ocr- packages. -lang must always be specified if you need to OCR in other than English language.But if your document contains small text and you know/believe it may have been scanned at a higher DPI, specify it. This is used when converting PDF pages to images and 300 is a good value. -resolution has a default value of 300 DPI.Note that by default, this script will convert your document to black and white! Using this option you avoid any kind of conversion. -nopreproc is useful when the PDF already contains processed images and you don't want any other processing.It's easy to use, but there are some command line arguments that need attention:

You can download the DEB package from the website and you can install it with GDebi. Not only it extracts all pages from PDF as images, but it also pre-processes them for OCR using multiple threads. In this situation, you can use the pdfsandwich script by Tobias Elze. And this can be a problem if you didn't scan the document and have no idea what resolution it is. And to do this, you must know the resolution of the scanned image. In order to use tesseract, it must be exported to images. Things get complicated if you already have a PDF document that you want to make searchable. Copy the above snippet into a new file ocr.sh, make it executable ( chmod +x ocr.sh), then place it in the folder with scanned images and run it. To use it, you need also pdftk installed. tif files from the directory where it is run and processes them with tesseract.
#LINUX OCR PDF TO TEXT CODE#
LANG=eng #replace with your language code If you have a bunch of images resulted from a scanner, you can make a simple script that will OCR each image into single page searchable PDF then join pages into a single PDF document: Sudo apt-get install tesseract-ocr tesseract-ocr-all You can install it on APT based Linux (like Ubuntu) using the following command: The only problem is that it only accepts image input. Tesseract & PDFsandwich Tesseract is the first and currently the only OCR engine for Linux that supports direct searchable PDF output (starting from version 3.03).
