in reply to PDF::Template and character encodings

I don't know about with PDF::Template, but when I use PDFLib, I do this in order to make accented characters like that work:

my $pdf = pdflib_pl::PDF_new(); pdflib_pl::PDF_set_parameter($pdf, "textformat", "utf8");
of course this means that the text you are inserting must be utf8 and not Latin-1, but Encode can take care of that for you.

Now as for how to make it all work with PDF::Template, I suggest you do a little source diving, the code is readable and the internals are very consistent so it should be pretty obvious where you would need to patch stuff.

-stvn

Replies are listed 'Best First'.
Re^2: PDF::Template and character encodings
by geektron (Curate) on Oct 16, 2007 at 14:14 UTC
    I actually have already tried source diving in PDF::Template. The patch mentioned in the originally referenced thread didn't get me any closer to resolving the problem, and I don't see any way to pass raw PDFlib::* values to PDF::Template. I really hate making modifications to the source itself; such changes get lost when/if the module gets updated.
      I really hate making modifications to the source itself; such changes get lost when/if the module gets updated.

      Push it back upstream to dragonchild, I suspect if you include a test he would accept the patch.

      -stvn