#!/usr/bin/perl -w
use strict;
use warnings;
use lib './lib';
use base 'Dyer::CLI';
use PDF::OCR::Thorough::Cached;
our $VERSION = sprintf "%d.%02d", q$Revision: 1.3 $ =~ /(\d+)/g;

my $conf = config('/etc/pdf2ocr.conf');

my $o= gopts('c:');


my $pdfs = argv_aspaths();

scalar @$pdfs or man();


for (@$pdfs){
   my $p = new PDF::OCR::Thorough::Cached($_) or next;
	$p->set_abs_cache($conf->{abs_cache});

   my $text = $p->get_text;

   print $text;
}











__END__

=pod

=head1 NAME

pdf2ocr - get text content of pdf document images within

=head1 DESCRIPTION

argument is a pdf file

this script assumes that each page in the pdf is one 8.5x11 page.. ONE image
that's what the calculations are set up for


=head1 OPTIONS

	-h help
	-d debug
	-v version

=head1 SEE ALSO

PDF::OCR::Thorough::Cached

=head1 AUTHOR

Leo Charre leocharre at cpan dot org

=cut
