NAME
PDF::OCR::Thorough::Cached - save ocr to text file for easy retrieval
DESCRIPTION
This is just like PDF::OCR::Thorough, only the text is saved to a text file, so subseuent retrievals are snap quick. This inherits all the methods if PDF::OCR::Thorough
SYNOPSIS
my $p = new PDF::OCR::Thorough::Cached('/abs/path/file.pdf');
$PDF::OCR::Thorough::Cached::ABS_CACHE_DIR = '/tmp/cache';
$PDF::OCR::Thorough::Cached::CACHE_BY_SUM = 1;
my $text = $p->get_text;
$PDF::OCR::Thorough::Cached::ABS_CACHE_DIR
Directory that will be the cache. The directory must exist. Defaults to '/tmp/PDF-OCR-Thorough-Cached'.
$PDF::OCR::Thorough::Cached::CACHE_BY_SUM
If you set to true, we set where the files are stored by md5sum. If the ABS_CACHE_DIR is set to '/tmp/cache' and the md5sum is 209218904fc0d1bfbacdd9d90655f545, Then the abs_cached() destination would be: /tmp/cache/20/209218904fc0d1bfbacdd9d90655f545
abs_cached()
Returns abs path to where cached txt of pdf should be.
is_cached()
Returns boolean. Does the cached version exist on disk?
SEE ALSO
PDF::OCR PDF::OCR::Thorough tesseract
AUTHOR
Leo Charre leocharre at cpan dot org