use CAM::PDF; my $pdf_file = "foo.pdf"; my $obj = CAM::PDF->new($pdf_file) || die "$CAM::PDF::errstr\n"; my $txt = $obj->getPageText(1); CAM::PDF->asciify(\$txt); # same results without this statement. print $txt;