in reply to Re^2: Better way to add text to PDFs?
in thread Better way to add text to PDFs?

Your code works for me .. remember from my tutorial that the origin is the lower left, so look there for your text.

If you want it anywhere else, then $text->translate($x,$y) before you set your text (in your code, after the fillcolor.

If that doesn't work for some strange reason, then let me know what version of PDF::API2 you're using, and any other relevant information.

Cheers!
Rick Measham

Replies are listed 'Best First'.
Re^4: Better way to add text to PDFs?
by friedo (Prior) on Jul 15, 2005 at 18:12 UTC
    Thanks for taking a look, BigLug. I'm afraid the results are the same, even if I use translate to move the text about. Note that there's no problem creating new PDFs, e.g. if I use PDF::API2->new instead of open, and page instead of openpage. If I do that, I get a nice big "Wahoo!" exactly where I expect it, so I know it's not a problem with fonts, or the geometry. But I've had no luck whatsoever in modifying existing PDFs.

    FWIW, $PDF::API2::VERSION is 1.081.