开发者

iText PdfWriter doesn't write Arabic properly

开发者 https://www.devze.com 2023-02-10 20:25 出处:网络
I tried to wri开发者_高级运维te Arabic content to pdf file using PdfWriter(document,FileoutPutStream), but when I opened the pdf file some of lines is over itself so it is unreadable, please is there

I tried to wri开发者_高级运维te Arabic content to pdf file using PdfWriter(document,FileoutPutStream), but when I opened the pdf file some of lines is over itself so it is unreadable, please is there any help?


I had a similar problem until I figured out that some fonts just will not display 'foreign' (to them) signs. I would suggest you to try using the same font as in a program (probably a notepad or something like that) where the text is displayed properly. It worked perfect for me. I opened the file first in notepad and there in Format-> Font... you see the font which was used to open it. Then you will have to find the location of the font, create the font object and give it to e.g. a paragraph before writing it to a document and it will work, at least I hope so. Good luck. :)

0

精彩评论

暂无评论...
验证码 换一张
取 消