Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: PDF::Template and character encodings

by stvn (Monsignor)
on Oct 15, 2007 at 22:35 UTC ( #645045=note: print w/replies, xml ) Need Help??


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

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://645045]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (5)
As of 2021-01-19 14:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?