pdfbox-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kévin Sailly <kevin.sai...@gmail.com>
Subject Re: Special characters and PDPageContentStream
Date Tue, 13 Mar 2012 19:02:07 GMT
Hello,

I am using DejaVuSansMono.ttf provided by my Debian distribution, it is
light and complete, but even if specials characters exist in it, and even
if the setFontEncoding mapping contains the special character, this will
not work...

Regards,
Kévin

2012/3/13 Christian Friedrich <friedric@fzi.de>

> Hello Everyone,
>
> I know that it is not the first time this someone asks about this topic
> here, but as there was no real solution I thought I’ll ask again.
>
> The problem is to print out special characters  (with the drawString()
> method of PDPageContentStream)  which do have an int value of >255 (not on
> ASCII table). A prominent example therefore is the €-sign. In my special
> case an experienced problem when printing the String “Section2ą”. The
> result with a standard PDType1Font (Helvetica) is “þÿ S e c t i o n 2ı_”.
> No surprise so far, since Helvetica is not TrueType (right?) and the “ą”
> char has an int value of 261.
>
> So I have tried to load any TrueType Font I could find with
> PDTrueTypeFont.loadTTF(). But besides my documents becoming really big
> (1MB->20MB), special character strings were not drawn correctly in any case.
>
> My question now, does anyone know a .ttf font where this approach works?
> Does the setFontEncoding() method of PDFont can in any way help with this
> issue?
>
> Thanks!
>
>
> Mit freundlichen Grüßen / Best Regards
>
> Christian Friedrich
>
>
> =======================================================================
> FZI Forschungszentrum Informatik an der Universitaet Karlsruhe
> Haid-und-Neu-Str. 10-14, D-76131 Karlsruhe
> Tel.: +49-721-9654-0, Fax: +49-721-9654-959 Stiftung des buergerlichen
> Rechts Stiftung Az: 14-0563.1 Regierungspraesidium Karlsruhe
> Vorstand: Dipl. Wi.-Ing. Michael Flor, Prof. Dr. rer. nat. Ralf Reussner,
> Prof. Dr. rer. nat. Dr. h.c. Wolffried Stucky, Prof. Dr. rer. nat. Rudi
> Studer
> Vorsitzender des Kuratoriums: Ministerialdirigent Guenther Leßnerkraus
> =======================================================================
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message