Free Support Forum - aspose.com

Arabic Font

Dear Sales
I am intending to purchase Aspose.PDF for web but i have to make sure that it can write Arabic.
can you please inform me if your software support Arabic

thanx

Dear samgh147,

Thanks for your consideration.

I don’t know Arabic but I think Aspose.Pdf can support Arabic with truetype font and unicode.

hi and thanks for helping me ive been stuck in this for hours and i have tried everything. please review my code and tell me what can i do as a solution


Dim pdf As pdf
pdf = New pdf()

Dim xmlFile As String = path + “\Xml\sam.xml”


pdf.BindXML(xmlFile, Nothing)
pdf.TextInfo.IsUnicode = True
pdf.TextInfo.FontEncoding = “UTF-8”
pdf.PageSetup.PageHeight = PageSize.A4Height
pdf.PageSetup.PageWidth = PageSize.A4Width
pdf.PageSetup.Margin.Top = 8
pdf.PageSetup.Margin.Bottom = 8

Dim hf As HeaderFooter
hf = pdf.Sections(0).OddHeader
Dim logoImage As Image
logoImage = CType(hf.Paragraphs(0), Image)


Dim section As section
section = pdf.Sections(“section1”)
section.TextInfo.IsUnicode = True
Dim dataText As Text
dataText = CType(section.Paragraphs(“PatientName”), Text)
Dim seg1 As Segment
seg1 = dataText.Segments(0)

'ive tried it with an without this line
'seg1.TextInfo.FontName = “Arial”

seg1.TextInfo.IsUnicode = True
seg1.TextInfo.TruetypeFontFileName = “C:/windows/fonts/Arabic Transparent.ttf”
seg1.Content = “samer " & “???” & " tamer” ’ here were i want to write arabic


logoImage.ImageInfo.File = path + “\Images\Header.jpg”
logoImage.ImageScale = 1





XML
<?xml version="1.0" encoding="utf-8" ?>












Patient Name:









Age:











ء



page $p






i have also tried
<?xml version="1.0" encoding="utf-16" ?>
but it does not work
and if i write in Arabic directly to the XML its displays an error of encoding

Thank you
Samgh147

Dear samgh147,

Thanks for your consideration.

Let’s use this thread to discuss the problem but not post at both 2 threads. Here is my test XML and I think the result pdf file is correct.

<?xml version="1.0" encoding="utf-8" ?>



<Segment IsUnicode=“true” FontSize=“14”
TruetypeFontFileName=“c:/windows/fonts/artro.ttf”>
???





If it still won’t work, please let me know.

Dear Tommy Wang

Thank you for your consideration. but i think Apose must take into consideration that Arabic language is a Right to Left Lang and when you put two charachters or more they join (connect) together and do not remain saparated like in english.

and that exactly what hapend with us the word is written left to right (wich is reversed) and the charachters are seperated.

Best Regards
Samer Haddad

Dear Samer,

Thanks for your consideration.

I am sorry that I have not consider the right-to-left languages before. I am now working on table simplification and data integration which will be finished in early April. I have to consider add support for right-to-left languages after I finished my current work.

Dear Tommy,

Thanks anyways. and please notify me when you finish the right-to-left feature.

Best Regards
Samer Haddad