/ Published in: Perl
URL: http://search.cpan.org/dist/CAM-PDF/
Converts the PDF 'example.pdf' to plain text.
IIRC this only converts the first page of the document, but that can be changed by modifying the argument to getPageContentTree on line 8. Been a while since I've used this so ymmv.
Expand |
Embed | Plain Text
#!/perl/bin/perl -w use CAM::PDF; use CAM::PDF::PageText; $filename = "example.pdf"; my $pdf = CAM::PDF->new($filename); my $pageone_tree = $pdf->getPageContentTree(4); #Note: I had to install CAM::PDF::PageText by hand, it was not installed by CPAN when I installed CAM::PDF.
You need to login to post a comment.
