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 OriginalGriff 383
1 Richard Deeming 180
2 Sergey Alexandrovich Kryukov 171
3 Yogesh Kumar Tyagi 165
4 ChauhanAjay 156
0 Sergey Alexandrovich Kryukov 6,252
1 OriginalGriff 5,498
2 CPallini 2,473
3 Richard MacCutchan 1,627
4 Abhinav S 1,530


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

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100