Question TfrTNPDFExportFilter German special Characters not showing up

  • Peter
  • Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
More
9 months 2 weeks ago #14183 by Peter
Hello Everyone !

I am suck since a few days on exporting a report via TfrTNPDFExportFilter to a PDF file.
The problem is that all German Special Characters are not shown in the PDF.
CT6.9 win10

Side Story .. my computer is US windows and i need the pdf for a German client,
but i cant get the special characters to work.
The report preview shows the special characters perfectly but TfrTNPDFExportFilter creates PDF without the special characters.

Does anyone has a solution to that problem ?

Thanks for any help

Please Log in or Create an account to join the conversation.

  • Klaus Riesterer
  • Klaus Riesterer's Avatar
  • Offline
  • User is blocked
  • User is blocked
More
9 months 2 weeks ago #14186 by Klaus Riesterer
Did not know the component you use but did you try libcairoexport also?

Mint Cinnamon 19.3 / CT 7.1 / FPC/Lazarus

Please Log in or Create an account to join the conversation.

  • Peter
  • Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
More
9 months 2 weeks ago - 9 months 2 weeks ago #14187 by Peter
Hi thank you for the reply.

I am using frReport1.ExportTo(TfrTNPDFExportFilter,xxx
I tried Cairo too, same effect. All Special characters are not displayed properly .
The report preview shows the special characters perfect, but exporting the report
to PDF is now working properly.
Ü, Ä, Ö etc are not displayed.

Thank you
Peter
Last edit: 9 months 2 weeks ago by Peter.

Please Log in or Create an account to join the conversation.

  • Klaus Riesterer
  • Klaus Riesterer's Avatar
  • Offline
  • User is blocked
  • User is blocked
More
9 months 1 week ago - 9 months 1 week ago #14188 by Klaus Riesterer
That is exactly what I have some time ago. I fixed it with using the cairoexporter.
Maybe this is not working with a non-german Windows.
Sadly I can't test because my platform is Linux.

That is what I have and what is working for me:
frAuftrag.ExportTo(TlrCairoExportFilter, 'print.tmp')

Mint Cinnamon 19.3 / CT 7.1 / FPC/Lazarus
Last edit: 9 months 1 week ago by Klaus Riesterer.

Please Log in or Create an account to join the conversation.

  • Peter
  • Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
More
9 months 1 week ago - 9 months 1 week ago #14189 by Peter
Hello all,

frReport1.ExportTo(TfrTNPDFExportFilter,'./Mietangebot\'+case_no+'.pdf');
or
frReport1.ExportTo(TlrCairoExportFilter ,'./Mietangebot\'+case_no+'.pdf');

both display the same problem. Well, the pdf should be created from the report.
The report preview looks perfect. So there is sure something not right with how the
exportfilter handles the Windows system language. I have tried to change the windows
language to German, but it does not effect the pdf. It still displays junk characters when
it comes to German special characters.
I went as far as changing the encoding in the lr_e.pas(around line 500) but there is no way to
display the proper characters, even when you set the encoding manually.
PRTLabel.Caption :=UTF8toCP1252(TEXT);
or
ISO 8859-1 or -15
I am using the latest version of the pdf reader.

The funny thing is that temstr:= StringReplace(Text, 'ü','ue',[rfReplaceAll]) recognizes the ü and i can replace it
with an ue. Why the ü does not display is beyond my understanding.
Last edit: 9 months 1 week ago by Peter.

Please Log in or Create an account to join the conversation.

  • Klaus Riesterer
  • Klaus Riesterer's Avatar
  • Offline
  • User is blocked
  • User is blocked
More
9 months 1 week ago #14190 by Klaus Riesterer
My files all are UTF8 encoded, what's yours?
Maybe this will do the trick.

Mint Cinnamon 19.3 / CT 7.1 / FPC/Lazarus

Please Log in or Create an account to join the conversation.

  • Peter
  • Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
More
9 months 1 week ago #14191 by Peter
Yes all UTF8 encoded .. ,except that pdf .. that is i pdf style winencoding.

I have not found any solution for that problem yet.

Please Log in or Create an account to join the conversation.