Author Topic: PowerPDF characters encoding problem  (Read 6959 times)


  • New member
  • *
  • Posts: 11
PowerPDF characters encoding problem
« on: August 05, 2009, 04:58:07 pm »
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)
Code: [Select]
  TYPE1_FONT_STR_TABLE: array[0..2] of TPDF_STR_TBL =(
                         (KEY: 'Type'; VAL: 'Font'),
                         (KEY: 'Subtype'; VAL: 'Type1'),
                         (KEY: 'Encoding'; VAL: 'WinAnsiEncoding')
                         (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,
Vivi come se dovessi morire domani, pensa come se non dovessi morire mai


  • Guest
Re: PowerPDF characters encoding problem
« Reply #1 on: January 11, 2010, 10:18:59 am »
I just looking for the same. Is powerpdf support utf8 ?


  • New member
  • *
  • Posts: 22
Re: PowerPDF characters encoding problem
« Reply #2 on: March 27, 2018, 02:01:17 am »
Anybody has a clue on how to solve this?


  • Sr. Member
  • ****
  • Posts: 455
Re: PowerPDF characters encoding problem
« Reply #3 on: March 27, 2018, 07:59:49 am »
muzzoman: do you have a sample project showing the problem?, at least here, writing the euro symbol in a LazReport report exported to  pdf via PowerPDF works fine. In general, PowerPDF should work fine for latin characters but not much more.