Thanks for the suggestion, merlyn. Unfortunately the docs for PDF::API2 are a bit sparse. Here is what I'm trying:
my $pdf = PDF::API2->open($file);
my $f1 = $pdf->corefont('Times', -encode => 'latin1' );
my $ppage = $pdf->openpage(1);
my $gfx = $ppage->gfx;
$gfx->textlabel(15, 15, $f1, 12, "Wahoo!", -color => 'red');
$pdf->saveas("/tmp/foo.pdf");
Unfortunately the new PDF looks exactly the same (the annotation does not appear.) I looked in the examples directory of the PDF::API2 distribution but, like the docs, they seem to assume that the user has an intricate knowledge of how PDFs work, which I don't. Thanks for any additional pointers.
|