aspose file tools
The moose likes Java in General and the fly likes Arabic using iText Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Elasticsearch in Action this week in the Big Data forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Arabic using iText" Watch "Arabic using iText" New topic

Arabic using iText

Vassili Vladimir
Ranch Hand

Joined: Mar 08, 2007
Posts: 1585

I want to add some arabic text in my PDF files using iText. How can I do that?

Thanks in advance,

Vassili ...
SCJP 5.0, SCWCD 1.4, SCJA 1.0
Lester Burnham

Joined: Oct 14, 2008
Posts: 1337
The iText API is based on Java String objects - which represent Unicode characters, so you cann add any text that can be represented in Unicode.
A difficulty may be if the machine where the file is viewed does not have a font with Arabic characters. Unless you can safely assume that it has, it may be better to include a suitable font in the PDF.
Vassili Vladimir
Ranch Hand

Joined: Mar 08, 2007
Posts: 1585
Thanks for your reply, but can you please post an example?
Rob Spoor

Joined: Oct 27, 2005
Posts: 19908

I suggest you get the book "iText in Action". It has a complete section (or possibly even chapter) on I18N, including hints for Arabic.

How To Ask Questions How To Answer Questions
I agree. Here's the link:
subject: Arabic using iText