in reply to Example Of Using CAM::PDF Like HTML::TokeParser
Would something like this help? I'm still trying to get a handle on it, and this is what I have so far.
#!/usr/bin/perl use strict; use warnings; use Devel::SimpleTrace; use CAM::PDF; use CAM::PDF::Content; use CAM::PDF::PageText; use Data::Dumper::Concise; my $file = '/root/Desktop/sample1.pdf'; binmode STDOUT, ":encoding(utf8)"; my $pdf = CAM::PDF->new($file); for my $pagenum(1 .. $pdf->numPages) { my $contentTree = $pdf->getPageContentTree($pagenum) or next; $contentTree->validate() or die $@; print Dumper($contentTree->render('CAM::PDF::Renderer::Dump')); $pdf->setPageContent(2,$pagenum); last; }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Example Of Using CAM::PDF Like HTML::TokeParser
by Limbic~Region (Chancellor) on Oct 11, 2011 at 00:42 UTC | |
by Khen1950fx (Canon) on Oct 12, 2011 at 06:36 UTC |
In Section
Seekers of Perl Wisdom