• [SOLVED] OCR not extracting text from PDFs, but scanned correctly

  • We tried to make OpenKM as intuitive as possible, but an advice is always welcome.
We tried to make OpenKM as intuitive as possible, but an advice is always welcome.
Forum rules: Please, before asking something see the documentation wiki or use the search feature of the forum. And remember we don't have a crystal ball or mental readers, so if you post about an issue tell us which OpenKM are you using and also the browser and operating system version. For more info read How to Report Bugs Effectively.
 #52641  by LauryMenton
 
Hello, I have a problem with the text extractor from OpenKM (CE) not extracting the text from any PDF correctly. But it process all of them correctly (checked from Administration panel).

As an example, this is one of the documents that was successfully analyzed by OCR, but the 'NDC_TEXT' column does not have any content actually.

Image

The PDF (from above), and the other ones I have uploaded to OpenKM, are all OCR compatible and fully searchables.

I left as default the list of all included text extractor (registered.text.extractors):
Code: Select all
com.openkm.extractor.PlainTextExtractor
com.openkm.extractor.MsWordTextExtractor
com.openkm.extractor.MsExcelTextExtractor
com.openkm.extractor.MsPowerPointTextExtractor
com.openkm.extractor.OpenOfficeTextExtractor
com.openkm.extractor.RTFTextExtractor
com.openkm.extractor.HTMLTextExtractor
com.openkm.extractor.XMLTextExtractor
com.openkm.extractor.MsOutlookTextExtractor
com.openkm.extractor.PdfTextExtractor
com.openkm.extractor.AudioTextExtractor
com.openkm.extractor.ExifTextExtractor
com.openkm.extractor.Tesseract3TextExtractor
com.openkm.extractor.SourceCodeTextExtractor
com.openkm.extractor.MsOffice2007TextExtractor
And also, left without anyvalue the system.ocr. But I have tried adding tesseract (value=/usr/bin/tesseract ${fileIn} ${fileOut} -l spa), but as this is used for images, I disabled that field again (it didn't extract any text from the test I have made).

Any ideas?

- - - - - - - - - - - - - - - - -

Some useful information:
- Docker installation (v6.3.11).
Last edited by LauryMenton on Mon Jul 26, 2021 3:21 pm, edited 1 time in total.
 #52661  by jllort
 
* The test extractor used should be tesseract.
* Ensure system.ocr is right configured ( check tesseract from command line )
* Restart OpenKM and try again with Check text extractor in the administration

If it does not work, share some screenshots :
* system.ocr configuration screen
* administration check text extration screen
* the document are trying to process from administration > check text extraction
 #52666  by LauryMenton
 
The OCR is now working properly.

I just needed to, as you suggested to me:
1. Configure 'tesseract' as the primary OCR tool. (system.ocr)
2. Install missing language pack for 'spanish', as I thought it was already installed/included during installation of OpenKM.

Solved. And thanks again!

About Us

OpenKM is part of the management software. A management software is a program that facilitates the accomplishment of administrative tasks. OpenKM is a document management system that allows you to manage business content and workflow in a more efficient way. Document managers guarantee data protection by establishing information security for business content.