It solved the problem. Thanks.
-----Message d'origine-----
De : Andreas Lehmkühler [mailto:[email protected]]
Envoyé : jeudi 2 avril 2009 11:44
À : [email protected]
Objet : Re: RE: RE: PDFBox and Accent
> When I open my pdf I have accents but a popup message open with content :
> Impossible d'extraire la police incorporée...
> So in english I think :
> Unable to extract the embedded font...
Aaah, I see. Within pdfbox it is sometimes important to find the right order to
do things. I guess it is an pdfbox-issue and not because of the
pdfbox-reference.
Back to your problem. I'm using pdfbox to embed fonts too and for me it works
fine if I do it like this:
1. create your PDDocument
2. add your font(s) to the document, e.g. using
PDTrueTypeFont.loadTTF(pdDocument, new File("C:\\Windows\\Fonts\CALIBRI.TTF"));
3. now create your PDPage, PDContentStream and add some text using the font
added before
Hope this helps
Andreas Lehmkühler
>
> -----Message d'origine-----
> De : Andreas Lehmkühler [mailto:[email protected]]
> Envoyé : jeudi 2 avril 2009 09:06
> À : [email protected]
> Objet : Re: RE: PDFBox and Accent
>
> > 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"));
> Sorry, but I don't understand your question.
> The bundled fonts are limited concerning special charcaters, so that you
> have to use an other font.
> Where is exact the problem in using e.g. a windows true type font? Do you
> have some other fonts you want to use and you don't know how?
>
> Andreas Lehmkühler
>
> > -----Message d'origine-----
> > De : Andreas Lehmkühler [mailto:[email protected]]
> > Envoyé : mercredi 1 avril 2009 18:01
> > À : [email protected]
> > Objet : Re: PDFBox and Accent
> >
> >
> >
> > [email protected] 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:[email protected]]
> > > Envoyé : mercredi 1 avril 2009 17:43
> > > À : [email protected]
> > > Objet : Re: PDFBox and Accent
> > >
> > >
> > >
> > > [email protected] 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
> >
>
> --- original Nachricht Ende ----
>
>
--- original Nachricht Ende ----