Hello Mehmet,

The difference is that the call you mention only supports about 256 characters (WinAnsiEncoding), the one I mention supports unicode. It's also deprecated since 2014 and should mention the method I posted in the javadoc. And it's been removed in 3.0 so you're probably using 2.0, not 3.0 ?!

Tilman


Am 31.07.2022 um 00:15 schrieb Mehmet Fatih ÇİN:
Dear Tilmar, thank you very much for your interest. The line of code you shared 
solved my problem. However, there is something I don't understand. What is the 
difference between the line of code you suggested and the line of code below.

PDFont font2 = PDTrueTypeFont.loadTTF(doc, new 
File(getClass().getResource("/ttf/Arial.ttf").toURI()));


Mehmet Fatih ÇİN


-----Original Message-----
From: Tilman Hausherr <thaush...@t-online.de>
Sent: Saturday, July 30, 2022 6:45 PM
To: users@pdfbox.apache.org
Subject: Re: Hello, I'm recently trying to create a ".pdf" document with PDFBox version 3.0. But I 
couldn't set the font of a text to "Arial". Besides, the Turkish character "\u0131" is 
not displayed on the document. How can I solve this problem?

Hello Mehmet,

Please post the code you used. Did it use the font with the call

PDFont font = PDType0Font.load(doc, new File("c:/windows/fonts/arial.ttf"));

?

Tilman

Am 30.07.2022 um 17:25 schrieb Mehmet Fatih ÇİN:
Hello, I'm recently trying to create a ".pdf" document with PDFBox version 3.0. But I couldn't set 
the font of a text to "Arial". Besides, the Turkish character "\u0131" is not displayed 
on the document. How can I solve this problem?


Mehmet Fatih ÇİN

e-Mail Adress: mfatih...@outlook.com.tr


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: users-h...@pdfbox.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: users-h...@pdfbox.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: users-h...@pdfbox.apache.org

Reply via email to