use Apache::Tika; my $tika = Apache::Tika->new(); open my $fh, '<:raw', 'x.pdf'; my $pdf = do { local $/; <$fh> }; close $fh; my $text = $tika->tika($pdf); print "$text\n"; #### use Apache::Tika::Async; my $tika= Apache::Tika::Server->new; my $fn= shift; use Data::Dumper; print Dumper $tika->get_meta($fn); print Dumper $tika->get_text($fn); #### use Data::Dumper; use Apache::Tika::Server; my $tika= Apache::Tika::Server->new(); # $tika->launch(); my $fn = "x.pdf"; print Dumper $tika->get_text($fn);