Click here to Skip to main content
12,696,493 members (30,951 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: C# 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 22: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
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web02 | 2.8.170118.1 | Last Updated 10 Oct 2012
Copyright © CodeProject, 1999-2017
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