Module CAM::PDF
[email protected] ("Naji, Khalid") Wed, 13 Jan 2010 10:39:34 +0100
| Newsgroups | perl.beginners.cgi |
|---|---|
| Message-ID | <[email protected]> |
Hello,
The following Script don't work with all PDF-Files.
The generated Error is: Can't call method "getRootDict" on an undefined
value at .../perl5/site_perl/5.8.8/CAM/PDF.pm line 3766
################ The Script ####################
use strict;=20
use CGI;
my $cgi =3D new CGI;=20
use CAM::PDF;
use File::Basename;
my ($pdf, $anotherpdf);
#The Files
my ($pdf1) =3D '/tmp/pdf1.pdf';=20
my ($pdf2) =3D '/tmp/download/pdf2.pdf';
my ($pdfout) =3D '/tmp/edl/20090272371_7948.pdf';
eval {
$pdf =3D CAM::PDF->new($pdf1);
$anotherpdf =3D CAM::PDF->new($pdf2);
$pdf->appendPDF($anotherpdf);
$pdf->cleanoutput($pdfout);
};
if ($@) {
print "Error: $@ \n";
}
else { print "Success!\n";}
###########################################
Thank you,
KN