Oct 25, 2001, 12:05 PM
Post #1 of 1
Hi - I'm trying to open an existing PDF file to add snippets of text to certain areas of it - the problem is that I have yet to get an existing PDF file to simply OPEN (I'm using the API2 module). When I try to run the script, I get two error messages - the first one is when the "PDF::API2->open" command is invoked, and the second is when the "$pdf->openpage" command is invoked. Both error messages are the same:
Editing a PDF file
<variable type> found where operator expected at ./test_pdf.pl line 10, near "->open "testfile.pdf""
(Missing operator before "testfile.pdf"?)
syntax error at ./test_pdf.pl line 10, near "->open "testfile.pdf""
where <variable type> is a string or scalar. I modeled the commands I'm using from the command examples for this module at http://search.cpan.org/doc/AREIBENS/PDF-API2-0.1.16_beta/lib/PDF/API2.pm
Can someone tell me how to fix this? I pasted the snippet of code from this script relevant to this procedure below. Thanks!