Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

PDF::API2 Error

Status
Not open for further replies.

chrisw669

Technical User
Feb 19, 2002
43
US
I'm trying to get the program below to work on aix with perl 5.6.0 and am getting the following error:

Can't call method "outfilt" on an undefined value at /usr/opt/perl5/lib/5.6.0/PDF/API2/PDF/Dict.pm line 155.

The crazy thing is, i run the exact same thing under windows 2000 with activeperl and it works fine...

Code:
#!/usr/bin/perl

use PDF::API2;

my $pdf  = PDF::API2->new(-file => "$0.pdf");
$pdf->mediabox(595,842);
my $page = $pdf->page;
my $fnt = $pdf->corefont('Arial',-encoding => 'latin1'); 
my $txt = $page->hybrid;
$txt->textstart;
$txt->font($fnt, 20);
$txt->translate(100,800);
$txt->text("Text left-aligned 0123456789");
$txt->translate(500,750);
$txt->text_right("0123456789 Text right-aligned");
$txt->translate(300,700);
$txt->text_center("Text center-aligned");
$txt->textend;
$pdf->save;
$pdf->end();

any suggestions would be most appreciated.
 
ah crap. sorry all. i wasn't watching what i was doing when i posted.... having worse of a day than i thought...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top