this was working last week, I made a few changes to some text in the perl but nothing that would stop it from working.
on the line my $page = $pdf->openpage(1); the script will stop and give me a error
Can't call method "infilt" on an undefined value at
/usr/lib/perl5/site_perl/5.8.5/PDF/API2/Util.pm line 667 (#1)
(F) You used the syntax of a method call, but the slot filled by t
+he
object reference or package name contains an undefined value. Som
+ething
like this will reproduce the error:
$BADREF = undef;
process $BADREF 1,2,3;
$BADREF->process(1,2,3);
Uncaught exception from user code:
Can't call method "infilt" on an undefined value at /usr/lib/p
+erl5/site_perl/5.8.5/PDF/API2/Util.pm line 667.
at /usr/lib/perl5/site_perl/5.8.5/PDF/API2/Util.pm line 667
PDF::API2::Util::unfilter('PDF::API2::Basic::PDF::Name=HASH(0x
+96dc8a8)', 'H\x{89}\x{8c}V\x{c9}n\x{db}0\x{10}\x{bd}\x{eb}+\x{e6}\x{d
+8}\x{1e}\x{c2}p\x{19}.\x{2}\x{c}\x{1}\x{b1}Q\x{17}H\x{da}K#\x{a0}\x{8
+7} (\x{8c}\x{d4}M\x{9d}\x{ca}\x{d}*\x{c7}\x{9}\x{d2}\x{af}\x{ef}p\x{9
+3}(;As\x{90}\x{c4}ef\x{de}\x{9b}\x{e1}\x{a3}\x{c8}?...') called at /u
+sr/lib/perl5/site_perl/5.8.5/PDF/API2.pm line 991
PDF::API2::openpage('PDF::API2=HASH(0x93b0a10)', 1) called at
+/opt/apache-tomcat-5.5.12/webapps/CalculatorPrinting/WEB-INF/cgi/HPSO
+AReport.pl line 510
I can't figure out why its haulting at this point, I created a template in Adobe indesign and saved it as a PDF, in which i have API2 open it and add some content, again this all worked last week
I checked the indesign for the compression and i have no compression on it at all, so I am not sure the problem is there or not.
here is the are where it is failing ( the complete code is too large to put here, strict and warnings are used)
########################### MAKE PDF ############################
my $Template = 'HP_SOA_Assement.pdf';
my $pdf = PDF::API2->open($Template);
my $page = $pdf->openpage(1);
##### Set Font
###############
my %font = (
Helvetica => {
Bold => $pdf->corefont('Helvetica-Bold', -encoding =>
+'utf-8'),
Roman => $pdf->corefont('Helvetica', -encoding =>
+'utf-8'),
Italic => $pdf->corefont('Helvetica-Oblique', -encoding =>
+'utf-8'),
},
Futura => {
Bold => $pdf->ttfont('FtraHv__.ttf', -encoding => 'utf
+-8'),
Medium => $pdf->ttfont('FtraMd__.ttf', -encoding => 'u
+tf-8'),
Lite => $pdf->ttfont('FtraLt__.ttf', -encoding => 'utf-
+8'),
},
);
## Set Text
###############
newText($fontType, 'Bold', 12/pt, 'black', 13/mm, 91/mm, $valueHash{"
+forCover"});
newText($fontType, 'Bold', 10/pt, 'black', 13/mm, 81/mm, $valueHash{"
+byCover"});
######################################## PAGE 2 ####################
+#####################################
$page = $pdf->openpage(2);
sub newText{
my $flashVars = $page->text;
$flashVars->font( $font{$_[0]}{$_[1]}, $_[2] );
$flashVars->fillcolor( $_[3] );
$flashVars->translate( $_[4], $_[5] );
$flashVars->text( $_[6] );
}
Any Ideas as to why this is happening?