in reply to Better way to add text to PDFs?

See PDF::API2. There's even an example in their distro of adding a watermark to every page.

-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.

Replies are listed 'Best First'.
Re^2: Better way to add text to PDFs?
by friedo (Prior) on Jul 14, 2005 at 17:19 UTC
    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.