0

I have content entered by an user which will be inserted into a pdf created by PDFlib.

Some user now have entered some text which seems to have combining diaeresis.

These are displayed in the pdf as a (with space after) instead of ä. When I convert this UTF-8 text in an editor to ANSI i got . In the database and on the website this characters are displayed correctly as ä.

Do I miss some Configuration for the textflow option list? Or do I have to convert this string? How can I convert this string correctly?

My Code to display these is as followed:

$itemOptlist = "charref encoding=unicode fontname=Helvetica fontsize=12 leading=120% alignment=justify leftindent=20";
$tf = $p->add_textflow($tf, '...Arbeitsabläufe...' /* This Text comes from the database */, $itemOptlist);
popeye
  • 481
  • 1
  • 4
  • 16
René Pflamm
  • 3,273
  • 17
  • 29
  • 1
    Replacing those byte sequences with their counterparts is probably your best bet (not sure if PDFlib can handle that on it’s own; not all libs out there have “Unicode” fully implemented), https://stackoverflow.com/a/37024147/1427878 has an easy way to do that. – CBroe Aug 27 '18 at 13:38
  • Thanks @CBroe, I have tried successfully the normalizer to get the diaeresis replaced. – René Pflamm Aug 27 '18 at 14:24

0 Answers0