That's the normal behavior for RTL. You may use LTR and it will look good to 
you but maybe not for an arabic reader (the dot will be placed on the right 
instead of the expected left). There's no easy solution, if any, you'll just 
have to know and this is not an iText specific problem. You may inspect the 
first non neutral char and go from there but it's no assurance that it will be 
correct.

Paulo
  ----- Original Message ----- 
  From: [email protected] 
  To: [email protected] 
  Sent: Saturday, July 10, 2010 11:55 AM
  Subject: [iText-questions] Unable to add Engish & Arabic characters 
togetherto PDF


  Hi,

  I have the requirement to generate a PDF, with a field which can have either 
english or arabic (Or Both) text. I am quite new to iText. I am using 
"com.lowagie.text" package to achieve the task. I need to make use of this only 
as there is already lot of code dependent on it. 

  To achieve this, i am doing the following:
  a) calling setRunDirection(PdfWriter.RUN_DIRECTION_RTL) on the PdfPCell.
  b) Also, using Font "ARIALUNI.TTF".

  But, the problem i am facing is if have the input as "Testing this text."
  I get the text on generated pdf as ".Testing this text"
  The character "." in put at the beginning instead of last. This happens with 
character "(" if put it at the last.

  Please let me know how to resolve it as the field i am talking about here is 
an input field for user. So, i have no control over what characters user enters 
to the field.

  I really appreciate a lot any help from any of you on this front.

  Thanks & Regards,
  Naveen
------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.itextpdf.com/book/
Check the site with examples before you ask questions: 
http://www.1t3xt.info/examples/
You can also search the keywords list: http://1t3xt.info/tutorials/keywords/

Reply via email to