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 the object reference or package name contains an undefined value. Something 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/perl5/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(0x96dc8a8)', 'H\x{89}\x{8c}V\x{c9}n\x{db}0\x{10}\x{bd}\x{eb}+\x{e6}\x{d8}\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{87} (\x{8c}\x{d4}M\x{9d}\x{ca}\x{d}*\x{c7}\x{9}\x{d2}\x{af}\x{ef}p\x{93}(;As\x{90}\x{c4}ef\x{de}\x{9b}\x{e1}\x{a3}\x{c8}?...') called at /usr/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/HPSOAReport.pl line 510 #### ########################### 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 => 'utf-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] ); }