Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have a good quality scan of a document; such scan is in pdf format.

How can I add ocr information to the pdf, so that it becomes searchable? By searchable I mean that the goal is that when viewing the pdf with evince, CTRL-F actually allows me to search in the pdf content.

share|improve this question
    
Duplicate? askubuntu.com/questions/16268/… –  Jakob Jun 7 '12 at 9:04
    
@Jakob, I don't think it's a dupe, we are asking different things. The other question is about extracting text from some pdf (i.e. generating corresponding txt files), while my question is about modifying the pdf in order to add ocr information and make work the search function in the pdf reader. I'll clarify the question. –  fdierre Jun 7 '12 at 10:17
    
How, and what did you use to scan the document? –  Mitch Jun 7 '12 at 11:05
    
@Mitch I used my office Ricoh Aficio MP-C2500 printer/copier/scanner, which has a very nice document feeder. :-) –  fdierre Jun 7 '12 at 12:06
    
Scanning and/or OCR Software? –  Mitch Jun 7 '12 at 12:18

5 Answers 5

There are two projects which do the trick: GScan2PDF and OCRFeeder

share|improve this answer

I found a non-ideal solution, but a very effective one.

I use PDF X-Change Viewer through Wine. It has an OCR feature which adds a text layer to the existing image-based pdf.

Thus you can search and copy text from this invisible layer.

enter image description here

share|improve this answer

You can use Ghostscript, which comes installed with Ubuntu. Find more info at the documentation. I didn't found anything useful, but at least I've gave you a possible method :)

share|improve this answer

For a command line solution, you can use pdfocr.

In brief, install software:

$ sudo apt-get install python-software-properties
$ sudo add-apt-repository ppa:gezakovacs/pdfocr
$ sudo apt-get update
$ sudo apt-get install pdfocr

Then run pdfocr:

$ pdfocr -i scanned.pdf -o scanned.with.search.pdf

That worked for me on Ubuntu 12.04 LTS.

share|improve this answer

pdfsandwich does what you want and provides Ubuntu deb packages. It uses tesseract as OCR engine. The following call adds the text layer to your scanned pdf:

pdfsandwich scanned.pdf

Disclaimer: I'm the developer of pdfsandwich and therefore obviously biased.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.