Home | Determine the OS and version of PHP »
OCR for PDF in Ubuntu
By admin | July 8, 2008
To get OCR in Ubuntu, you need to use the Open-Source Tesseract OCR engine. However, it can only perform OCR on the TIFF format. In order to allow it to do PDF, we also need the Evince PDF reader to allow us to export a page to TIFF to feed Tesseract with.
Install tesseract in Ubuntu:
$ sudo apt-get install tesseract-ocr
Now, get the TIFF from Evince; Right click the page and click “Save image as…” and export the file. Then, to get a good OCR we need to convert it to monochrome.
$ tesseract foo.tif bar
Unable to load unicharset file /usr/share/tesseract-ocr/tessdata/eng.unicharset
If the above bug happens, fix it by:
$ sudo apt-get install tesseract-ocr-eng
This is caused by a nasty bug in Ubuntu.
And now finally, do:
$ tesseract foo.tif bar# and without the .txt extension, or you will end up with bar.txt.txt
to complete it!
If you found this article helpful or interesting, please help Compdigitec spread the word. Don’t forget to subscribe to Compdigitec Labs for more useful and interesting articles!
Topics: Linux | 23 Comments »
June 11th, 2009 at 05:06
Thanks mate, exactly what I was searching for.
July 26th, 2009 at 17:23
I just got a 1 byte file 🙁 any ideas?
February 9th, 2010 at 13:22
Thanks for the awesome bugfix for Ubuntu. I was banging my head what was wrong.
August 6th, 2025 at 23:13
… [Trackback]
[…] There you can find 55258 additional Info to that Topic: compdigitec.com/labs/2008/07/08/ocr-for-pdf-in-ubuntu/ […]
August 9th, 2025 at 20:42
… [Trackback]
[…] Read More on to that Topic: compdigitec.com/labs/2008/07/08/ocr-for-pdf-in-ubuntu/ […]
August 9th, 2025 at 21:04
… [Trackback]
[…] Info to that Topic: compdigitec.com/labs/2008/07/08/ocr-for-pdf-in-ubuntu/ […]
August 16th, 2025 at 04:47
อ่านแล้วเข้าใจง่ายดี เกี่ยวกับ IQOS Thailand เห็นภาพรวมทั้งหมดเลย เคยลองใช้แล้วประทับใจ ขอคำแนะนำการเลือกซื้อหน่อยครับ
August 16th, 2025 at 23:30
Thank you for some other informative blog. The place else could I amm getting that kind of information written in sufh a perfect way?
I’ve a missin that I’m simply now operating on, and I have been at the
look out for such information.
My site … รับซื้อตลับหมึกเก่า ราคา
August 20th, 2025 at 10:22
… [Trackback]
[…] Read More to that Topic: compdigitec.com/labs/2008/07/08/ocr-for-pdf-in-ubuntu/ […]
August 24th, 2025 at 21:18
… [Trackback]
[…] Find More on that Topic: compdigitec.com/labs/2008/07/08/ocr-for-pdf-in-ubuntu/ […]
August 25th, 2025 at 14:24
Write more, thats all I have to say. Literally, it seems as though you relieed on the video to make your point.
You obviously know what youre talking about,
why throw away your intelligence on jjst poszting videos to your blog when you could be giving us something informative to read?
Here is my web page :: ไวน์ราคาถูก
August 26th, 2025 at 00:12
An outstaning share! I have just forwarded this onto a friend wwho had been doing
a little research on this. And hhe in faxt bought me lunch because I discovered it for him…
lol. So allow me to reword this…. Thank YOU for the
meal!! But yeah, thankls for spending some time to discuss this matter here on your site.
Here iis my web-site –ไวน์ ออนไลน์
August 26th, 2025 at 01:02
Itts such aas you read my mind! You appear to unbderstand so much abbout this, suchh as you wrote thee
book in itt or something. I believe that youu simply can do with some
p.c. to power the message house a litle bit, however instead oof that, this is great blog.
A great read. I will certainly bee back.
My blog post :: ขาย wine
August 26th, 2025 at 11:09
We’re a bunnch of volunteers and starting a brand new scheme in our community.
Your web site offered us with valuable information too work on. You have
performed a formidable activity and our whole
neighborhood might be grateful to you.
My web-site ร้าน ขาย ไวน์
August 26th, 2025 at 18:12
What’s up, its pleasant piece of writing concerning media print, we all be familiar with media is a impressive source of facts.
My web blog … Elida
August 28th, 2025 at 13:07
I was curious if you ever thought of changing the page layout of your site?
Its very well written; I love what youve got to say.
But maybe you could a little more in the way of content
sso pedople could connect with it better.
Youve got ann awful lot oof text for only having
one or two pictures. Maybe you could spaace it
out better?
Feel free to visit my blog :: Carlos
August 28th, 2025 at 17:18
First off I want to say great blog! I had a quick question in which I’d like to ask if you don’t mind.
I was curious to find out how you center yourself and clear your thoughts before writing.
I have had a tough time clearing my thhoughts in getting my thoughts out.
I do enjoy writing however it just seems like the first 10 to
15 minutes arre wasted just trying to figure out how tto begin. Any
suggestions or hints? Many thanks!
Also visit mmy webpage: โลโก้ฮวงจุ้ย
August 28th, 2025 at 17:25
My developer is trying to convince me to move to .netfrom PHP.
I have always disliked the idea because off the expenses.
But he’s tryiong none the less. I’ve beenn using Movable-type on segeral
websites for about a year and am nervous about switching to another
platform. I hace heard excellent things about blogengine.net.
Is there a way I can transfer all mmy wordpress content into it?
Any kind of help would be greatly appreciated!
My blog :: ออกแบบโลโก้ ฮวงจุ้ย ฟรี
September 1st, 2025 at 00:59
อ่านแล้วเข้าใจมากขึ้นเกี่ยวกับ “ดอกไม้งานศพ” บอกถึงวิธีเลือก ดอกไม้ ให้ตรงกับความหมาย น่าสนใจมาก ค่ะ
September 1st, 2025 at 03:19
อ่านแล้วเข้าใจมากขึ้นเกี่ยวกับ “ดอกไม้งานศพ” บอกถึงวิธีเลือก พวงหรีด ให้ตรงกับความหมาย น่าสนใจมาก ค่ะ
Also visit my site :: จัดดอกไม้งานศพ
September 1st, 2025 at 04:20
ขอบคุณสำหรับบทความดีๆ เกี่ยวกับ “ดอกไม้งานศพ” บอกถึงวิธีเลือก พวงหรีด ได้อย่างถูกต้อง
น่าสนใจมาก ค่ะ
Also visit my blog post – จัดดอกไม้หน้าศพ
September 1st, 2025 at 11:33
เป็นข้อมูลที่มีประโยชน์มากเรื่อง “ดอกไม้งานศพ” บอกถึงวิธีเลือก การจัดดอกไม้ ให้ตรงกับความหมาย น่าสนใจมาก ค่ะ
Feel free to visit my website … จัดดอกไม้งานศพ
September 1st, 2025 at 15:30
บทความนี้ให้ข้อมูลมีประโยชน์มากครับ
ถ้าใครกำลังมองหาผู้ให้บริการตกแต่งงานศพ ผมแนะนำลองดูร้านที่มีผลงานจริงและรีวิวดี ๆ ครับ
My web-site; จัดดอกไม้งานขาว ดํา ราคา