Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C#4.0
Hi,
I have several textboxes(name,fname,mname) and two check boxes( English and Arabic)
when i select the English check box the text should be entered from the left side in those text boxes if i select the Arabic Check box the text should be entered from the right in those text boxes. After that i want to export it to as a PDF and mali to some ID. As if now English is done using itextsharp but Arabic side not done.
please help out
Advance in thanks
Posted 6-Oct-12 21:44pm
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Hi Use this coe, i use this code to create persian(farsi) pdfs.
 
        PdfReader pdfReader = new PdfReader(Request.MapPath(ReportPath));
 
        var MemoryStream = new MemoryStream();
        PdfStamper pdfStamper = new PdfStamper(pdfReader, MemoryStream);
        pdfStamper.FormFlattening = true;
 
        AcroFields pdfForm = pdfStamper.AcroFields;
 

        pdfForm.SetField("PDF Field Name", Report.Customer.Title);
        //and Set Other Info

        pdfStamper.Close();
 
        pdfReader.Close();
 
        string FilePath = Server.MapPath("PDF File Path");
        byte[] bytes = MemoryStream.ToArray();
        using (FileStream FS = new FileStream(FilePath, FileMode.Create))
        {
            FS.Write(bytes, 0, bytes.Length);
        }
        return "PDF File Path";
 
Best Regards
  Permalink  
v2
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

while creating BaseFont, change your encoding value to 1256(this is for arabic).THis may solve your problem. You can check out below link.
 

http://msdn.microsoft.com/en-us/library/cc195058.aspx[^]
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 3

I know a Free tool free dataexport[^], it can export data to PDF, html,xml,excel,word,text,csv,dbf etc.You can give it a try. Hope it works.
  Permalink  

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

  Print Answers RSS
0 CHill60 240
1 Sarvesh Kumar Gupta 238
2 Sergey Alexandrovich Kryukov 193
3 DamithSL 153
4 OriginalGriff 138


Advertise | Privacy | Mobile
Web04 | 2.8.140709.1 | Last Updated 10 Oct 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid