You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@pdfbox.apache.org by jm...@avantias.com on 2009/04/01 16:23:51 UTC

PDFBox and Accent

How could I do to have accents with « drawString » of PDPageContentStream.

« è » is replaced by « Ł » for example.


RE: PDFBox and Accent

Posted by jm...@avantias.com.
With a windows true type font it works but is there another way to include fonts.

PDFont font = PDTrueTypeFont.loadTTF(pdDocument, new File("C:\\Windows\\Fonts\\CALIBRI.TTF")); 

-----Message d'origine-----
De : Andreas Lehmkühler [mailto:andreas@lehmi.de] 
Envoyé : mercredi 1 avril 2009 18:01
À : pdfbox-users@incubator.apache.org
Objet : Re: PDFBox and Accent



jmerey@avantias.com schrieb:
> I tried Helvetica, Times and Arial.
So, you've tried one of the fonts, which is bundled with pdfbox? These
are not suitable for special characters like german umlauts. Perhaps
french accents aren't supported too. Try to use a font from your
environment, e.g. a windows TrueType-font, which is known to support
those special characters.


Andreas Lehmkühler

> -----Message d'origine-----
> De : Andreas Lehmkühler [mailto:andreas@lehmi.de] 
> Envoyé : mercredi 1 avril 2009 17:43
> À : pdfbox-users@incubator.apache.org
> Objet : Re: PDFBox and Accent
> 
> 
> 
> jmerey@avantias.com schrieb:
>> How could I do to have accents with « drawString » of PDPageContentStream.
>>
>> « è » is replaced by « Ł » for example.
> What font are you using? Is it capable of displaying the accents?
> 
> Andreas Lehmkühler

Re: PDFBox and Accent

Posted by Andreas Lehmkühler <an...@lehmi.de>.

jmerey@avantias.com schrieb:
> I tried Helvetica, Times and Arial.
So, you've tried one of the fonts, which is bundled with pdfbox? These
are not suitable for special characters like german umlauts. Perhaps
french accents aren't supported too. Try to use a font from your
environment, e.g. a windows TrueType-font, which is known to support
those special characters.


Andreas Lehmkühler

> -----Message d'origine-----
> De : Andreas Lehmkühler [mailto:andreas@lehmi.de] 
> Envoyé : mercredi 1 avril 2009 17:43
> À : pdfbox-users@incubator.apache.org
> Objet : Re: PDFBox and Accent
> 
> 
> 
> jmerey@avantias.com schrieb:
>> How could I do to have accents with « drawString » of PDPageContentStream.
>>
>> « è » is replaced by « Ł » for example.
> What font are you using? Is it capable of displaying the accents?
> 
> Andreas Lehmkühler

RE: PDFBox and Accent

Posted by jm...@avantias.com.
I tried Helvetica, Times and Arial.

-----Message d'origine-----
De : Andreas Lehmkühler [mailto:andreas@lehmi.de] 
Envoyé : mercredi 1 avril 2009 17:43
À : pdfbox-users@incubator.apache.org
Objet : Re: PDFBox and Accent



jmerey@avantias.com schrieb:
> How could I do to have accents with « drawString » of PDPageContentStream.
> 
> « è » is replaced by « Ł » for example.
What font are you using? Is it capable of displaying the accents?

Andreas Lehmkühler

Re: PDFBox and Accent

Posted by Andreas Lehmkühler <an...@lehmi.de>.

jmerey@avantias.com schrieb:
> How could I do to have accents with « drawString » of PDPageContentStream.
> 
> « è » is replaced by « Ł » for example.
What font are you using? Is it capable of displaying the accents?

Andreas Lehmkühler