You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@pdfbox.apache.org by Martin Minka <ma...@gmail.com> on 2013/12/05 22:11:05 UTC
is it possible to write non-WinAnsiEncoding characters (utf-8) to PDF ?
So far I was able to solve all my problems with pdfbox, but at this moment
I got very much lost.
My problem is similar to one described with code example here :
http://stackoverflow.com/questions/13274578/java-write-national-characters-to-pdf-using-pdfbox
I want to print to PDF text with characters like: "ŽžŤťČ芚Áá" or the
german characters "üöäÄÜÖß".
Is there existing solution ?
I found few bugs related to utf8 in Jira and few questions on
stackoverflow, tried a lot, but at this moment I really got lost.
Thank you for any hint,
Martin
Re: is it possible to write non-WinAnsiEncoding characters (utf-8)
to PDF ?
Posted by Andreas Lehmkühler <an...@lehmi.de>.
Hi,
> Martin Minka <ma...@gmail.com> hat am 5. Dezember 2013 um 22:11
> geschrieben:
>
>
> So far I was able to solve all my problems with pdfbox, but at this moment
> I got very much lost.
>
> My problem is similar to one described with code example here :
> http://stackoverflow.com/questions/13274578/java-write-national-characters-to-pdf-using-pdfbox
>
> I want to print to PDF text with characters like: "ŽžŤťČ芚Áá" or the
> german characters "üöäÄÜÖß".
>
> Is there existing solution ?
No, not yet. PDFBox supports only WinANSI encoded true type fonts. Some/most of
the mentioned special
characters should work as long as you pass CP1252 encoded string to the
drawString method.
> I found few bugs related to utf8 in Jira and few questions on
> stackoverflow, tried a lot, but at this moment I really got lost.
PDFBOX-922 [1] will add unicode support to PDFBOX.
> Thank you for any hint,
> Martin
BR
Andreas Lehmkühler
[1] https://issues.apache.org/jira/browse/PDFBOX-922