2013-04-09 09:44:46 -07:00
OCRmyPDF
========
2013-04-25 12:20:26 +03:00
OCRmyPDF adds an OCR text layer to scanned PDF files, allowing them to be searched
2013-04-09 21:35:47 +02:00
2014-01-06 20:09:12 +01:00
To get the script usage, call: sh ./OCRmyPDF.sh -h
2013-04-19 23:00:35 +02:00
2014-01-07 23:13:42 +01:00
Main features
2013-04-19 23:00:35 +02:00
--------
2013-11-28 00:37:57 +01:00
- Generates a searchable PDF/A file from a PDF file containing only images
- Places OCRed text accurately below the image to ease copy / paste
- Keeps the exact resolution of the original embedded images
2014-01-25 22:14:05 +01:00
- or if requested oversamples the images before OCRing so as to get better results
2013-11-28 00:37:57 +01:00
- If requested deskews and / or clean the image before performing OCR
- Validates the generated file against the PDF/A specification using jhove
2013-04-23 00:33:48 +03:00
- Provides debug mode to enable easy verification of the OCR results
2013-05-06 21:54:41 +02:00
- Processes several pages in parallel if more than one CPU core is available
2013-04-19 23:00:35 +02:00
2014-01-14 19:47:28 +01:00
For details: please consult the release notes
2013-04-19 23:00:35 +02:00
Motivation
----------
2013-04-26 17:15:55 +03:00
I searched the web for a free command line tool to OCR PDF files on linux/unix:
I found many, but none of them were really satisfying.
- Either they produced PDF files with misplaced text under the image (making copy/paste impossible)
2013-04-26 18:43:15 +03:00
- Or they did not display correctly some escaped html characters located in the hocr file produced by the OCR engine
2013-04-19 23:00:35 +02:00
- Or they changed the resolution of the embedded images
2013-04-26 17:15:55 +03:00
- Or they generated PDF file having a ridiculous big size
2013-04-19 23:00:35 +02:00
- Or they crashed when trying to OCR some of my PDF files
- Or they did not produce valid PDF files (even though they were readable with my current PDF reader)
2013-04-26 17:15:55 +03:00
- On top of that none of them produced PDF/A files (format dedicated for long time storage / archiving)
2013-04-19 23:00:35 +02:00
... so I decided to develop my own tool (using various existing scripts as an inspiration)
2013-04-09 21:35:47 +02:00
Install
2014-01-03 16:13:17 +01:00
-------
2013-04-09 21:35:47 +02:00
2014-01-08 20:56:34 +01:00
Download OCRmyPDF here: https://github.com/fritz-hh/OCRmyPDF/releases
2013-04-18 10:44:10 +02:00
2013-04-26 16:12:13 +02:00
Copy the file in onto your linux/unix machine and extract it.
2013-04-18 10:44:10 +02:00
2013-04-26 18:46:18 +03:00
Run: "sh ./OCRmyPDF.sh -h" to get the script usage
2013-04-18 10:44:10 +02:00
2014-01-14 19:47:28 +01:00
If not yet installed, the script will notify you about dependencies that need to be installed.
The script requires specific versions of the dependencies. Older version than the ones mentioned in the release notes are likely not to be compatible to OCRmyPDF.
2014-01-03 16:13:17 +01:00
Support
-------
In case you detect an issue, please:
- Check if your issue is already known
2014-01-14 19:47:28 +01:00
- If no problem report exists on github, please create one here: https://github.com/fritz-hh/OCRmyPDF/issues
2014-01-03 16:13:17 +01:00
- Describe your problem thoroughly
- Append the console output of the script when running the debug mode (-g option)
2014-01-07 23:13:42 +01:00
- If possible provide your input PDF file as well as the content of the temporary folder (using a file sharing service like www.file-upload.net)
Press & Media
-------------
2014-09-20 20:47:02 +02:00
- c't 1-2014, page 59: Detailed presentation of OCRmyPDF v1.0 in the leading german IT magazine c't (http://www.heise.de/ct/inhalt/2014/1/58/)
- heise Open Source, 09/2014: Texterkennung mit OCRmyPDF (http://www.heise.de/-2356670)
2014-01-14 23:46:33 +01:00
Disclaimer
----------
The software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.