in reply to Re^2: PDF extract
in thread PDF extract

Here is what I have so far. When I tried to run it I got the error message Can't call method "getRootDict" on an undefined value..."
use CAM::PDF; use PDF::API2; my $file_name = shift; my $pdfone = CAM::PDF->new('pdfone.pdf'); for my $page (1 .. $pdfone->numPages()) { my $text = $pdfone->getPageText($page); @lines = split (/\n/, $text); foreach (@lines) { my $pdf = CAM::PDF->new('new.pdf'); $pdfone->appendPDF($pdf); } }

Replies are listed 'Best First'.