This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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 Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Arabic using iText" Watch "Arabic using iText" New topic
Author

Arabic using iText

Vassili Vladimir
Ranch Hand

Joined: Mar 08, 2007
Posts: 1585
Hi,

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
Rancher

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
Sheriff

Joined: Oct 27, 2005
Posts: 19654
    
  18

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


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Arabic using iText
 
Similar Threads
Printing the PDF
Using FOP for Arabic Output... SOS
how to export PDF report within the Arabic and English data through jsp code.
itext and non english letters problem
arabic