danmunn / redmine_dmsf

Fork of svn repository for redmine_dmsf

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

omindex with tesseract filter for scanned PDFs

whotopia opened this issue · comments

Hi, this may be more of an Xampian/Omega/tesseract question, but I was wondering, noting the following section in xapian_indexer.rb:

# omindex binary path
# To index "non-text" files, use omindex filters
# e.g.: tesseract OCR engine as a filter for PNG files
OMINDEX = '/usr/bin/omindex'
# $omindex += " --filter=image/png:'tesseract -l chi_sim+chi_tra %f -'"
# $omindex += " --filter=image/jpeg:'tesseract -l chi_sim+chi_tra %f -'"

I was wondering, if I had PDF files being uploaded to the DMS that were of mixed types .. i.e. some are 'proper' PDFs and others are PDFs containing scanned content with no OCR content in them. How would it be possible to set things up so that tesseract was called to OCR only when needed?