Hi all,
I used PowerPDF library to generate PDF document from within my application, everything works but the encoding of special characters (e.g. EURO symbol or accented chars).
So I checked PowerPDF sources and found in the PdfFonts.pas the code who (apparently) defines the 3 different fonts used by PowerPDF (fnArial, fnTimesRoman, fnFixedWidth).
I tried to modify the lines that seems to decide encoding table for a font (from line 35 in my version)
TYPE1_FONT_STR_TABLE: array[0..2] of TPDF_STR_TBL =(
(KEY: 'Type'; VAL: 'Font'),
(KEY: 'Subtype'; VAL: 'Type1'),
(KEY: 'Encoding'; VAL: 'WinAnsiEncoding')
);
.......
.......
.......
FIXED_WIDTH_DISC_STR_TABLE: array[0..2] of TPDF_STR_TBL =(
(KEY: 'Type'; VAL: 'FontDescriptor'),
(KEY: 'FontName'; VAL: 'Type1'),
(KEY: 'Encoding'; VAL: 'WinAnsiEncoding')
);
changing the VAL string from 'WinAnsiEncoding' to other encoding systems (such as 'ISO-8859-1, ISO-8859-15, Latin-1, UTF-8 and so on) but nothing happened after recompilation, the resulting PDF always has different characters in place of the right ones.
Done the above both for Fixed Width font (but it's a Courier and so the set is limited) and for the Arial (this one has for sure extended characters in it) but no success.
My app is developed and runs in a Windows XP Pro environment.
Anyone experimented the same issue? Any suggestions to solve this?
I guess it could be a good improvement for that amazing free-library to manage a wider set of characters (and maybe a wider number of fonts).
Thanks in advance,
Mauro