I have accented characters (á, for example) stored in a mysql database. HTML rendering is fine without converting the characters to HTMLEntities, but when I try to create a PDF with the same data and PDF::Template, I get a mangled "~Aj" combination.
From this google groups thread, setting a pdf_encoding in the xml template would be sufficient, e.g.:
<pdftemplate name="masterList" pdf_encoding='ISO-8859-1'>
But when I add pdf_encoding to my template, I get the following error:
PDFlib Error [1552] PDF_findfont: Font 'Helvetica' with encoding 'ISO-8859-1': Couldn't find encoding 'ISO-8859-1'
I've tried 'latin1', 'iso-8859-1', and 'utf-8' as valid encodings, but each one throws the above error (with the encoding substituted, of course).
I'm presuming the error is with PDFlib (it's throwing the error), but I'm hoping someone here has dealt with the same (or similar) issue and can give me a pointer or two.
EDIT 1) condensed template.xml
<pdftemplate name="masterList" pdf_encoding='iso8859-1'> <pagedef PAGE_WIDTH="612" PAGE_HEIGHT="792"> <font face="Helvetica" h="10"/> <LOOP NAME="ROWS"> <section> <row x='30' h="20"> <LOOP NAME='COLUMN'> <textbox w="50%"><VAR NAME="FIRST_NAME"/> <VAR NAME="LAST_NAM +E"/></textbox> </LOOP> </row> </section> </LOOP> </pagedef> </pdftemplate>
In reply to PDF::Template and character encodings by geektron
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |