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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

adding an image to a PDF

Status
Not open for further replies.

kliz0328

Programmer
Nov 7, 2005
138
US
I am trying to add an image to a PDF, Acrobat::FDF; is what it is. The code is written in Perl, but the Perl forum told me it was an Acrobat error. Here is the error I am getting

PerlScript Error error '80004005'

Can't locate auto/Acrobat/FDF/drawImage.al in @INC (@INC contains: C:/Perl/lib C:/Perl/site/lib .) (in cleanup) Can't locate auto/Acrobat/FDF/drawImage.al in @INC (@INC contains: C:/Perl/lib C:/Perl/site/lib .)


Here is my Perl code

# jpd 03mar2005 Apparently, newer Acrobat readers *need* an FDF after a SubmitForm. Bug? Feature? Who knows!
my $outputFDF = new Acrobat::FDF;
$outputFDF->SetTargetFrame ('Floater');
print DEBUG '$outputFDF->SetFile (' . $URL_Path . $FDF_URL . $FDF_Name . ")\n" if $debug;
$outputFDF->SetFile ($URL_Path . $FDF_URL . $FDF_Name);
$outputFDF->drawImage('images\dealerHeader_01.gif',150,150,1.75); # jpd 17mar2005 Try this?
# $outputFDF->SetSubmitFormAction('PrintForm', 3, "${URL_Path}PrintForm.asp?Form=$start_form&Copy=$copy_num&$RequestQueryString#FDF", 2);
# set the buttons and actions here? or use the actions from the PDF?
my $variant = Win32::OLE::Variant->new (VT_UI1, $outputFDF->SaveToBuf());
undef $outputFDF;
$Response->{ContentType} = 'application/vnd.fdf';
$Response->AddHeader ('Accept-Ranges', 'bytes');
$Response->AddHeader ('Expires', 'FRI, JUN 12 1981 08:20:00 GMT');
$Response->BinaryWrite ($variant);
print DEBUG "after BinaryWrite\n" if $debug;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top