PDF Outlines / Bookmarks (im lost)

P

Peter Wilson

Hi

I am having some problems modifying a pdf created by "Acrobat PDFWriter"
from word 2000 in perl using the PDF::API2 module.

When I create the document it looks fine and every thing is on the correct
page, after creation I then would like to add Bookmarks (outlines) to the
document, I have opened other documents (not created by word created by
myself via the PDF::API2 module) and the code below works anyone got any
ideas?

Error:

Can't locate object method "outline" via package "PDF::API2::pDF::Objind" at
bookmark.pl line 10.

Code:

use PDF::API2;
$pdf = PDF::API2->open('Document2.pdf');
$page = $pdf->openpage(9);
$otls = $pdf->outlines;
$otl=$otls->outline();
$otl->title('ERL');
$otl->dest($page,-fit=>1);
$subotl=$otl->outline();
$subotl->title('sometext');
$subotl->dest($page,-fit=>1);
$pdf->saveas('Document99.pdf');

Im a bit lost

Thanks

Peter
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,997
Messages
2,570,239
Members
46,827
Latest member
DMUK_Beginner

Latest Threads

Top