Click here to Skip to main content
15,887,676 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
Hi all
I create a PDF file with Arabic text using iTextSharp in vb.net but when I run code the letters of the word in pdf are disjointed and every letter is alone not connected .

What I have tried:

VB
Dim basef As BaseFont = BaseFont.CreateFont(fontPath, BaseFont.IDENTITY_H, True)
    Dim arabicfont As New iTextSharp.text.Font(basef, 24, iTextSharp.text.Font.NORMAL, iTextSharp.text.BaseColor.BLACK)
    Dim el As New Chunk()
    Dim arabicfont2 As New iTextSharp.text.Font(basef, 16, el.Font.Style, el.Font.Color)
    el.Font = arabicfont2


    Dim doc As Document = New Document(PageSize.A4)
    Dim wri As PdfWriter = PdfWriter.GetInstance(doc, fs)
    wri.RunDirection = iTextSharp.text.pdf.PdfWriter.RUN_DIRECTION_LTR

    doc.Open()
    Dim txe As iTextSharp.text.Paragraph = New TextSharp.text.Paragraph(StrReverse("الملف"), el.Font)

    doc.Add(txe)
    doc.Close()

Note : I want to do this without using PdfPTable ...

Can I get help or any suggestions about this ??
Thanks a lot
Posted
Comments
Maciej Los 12-May-17 15:18pm    
What is an issue? What kind of result you expect?
Member 13196917 12-May-17 15:30pm    
The word in the output pdf is separate and non-threaded ..

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900