NAME

PDF::OCR::Thorough::Cached - DEPRECATED save ocr to text file for easy retrieval

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;

DEPRECATED

This module is deprecated by PDF::OCR2, please do not use this code in new applications.

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

$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

METHODS

abs_cached()

Returns abs path to where cached txt of pdf should be.

is_cached()

Returns boolean. Does the cached version exist on disk?

CAVEATS

DEPRECATED.

SEE ALSO

PDF::OCR2 PDF::OCR PDF::OCR::Thorough tesseract

AUTHOR

Leo Charre leocharre at cpan dot org

COPYRIGHT

Copyright (c) 2009 Leo Charre. All rights reserved.

LICENSE

This package is free software; you can redistribute it and/or modify it under the same terms as Perl itself, i.e., under the terms of the "Artistic License" or the "GNU General Public License".

DISCLAIMER

This package is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

See the "GNU General Public License" for more details.