Click here to Skip to main content
15,895,557 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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

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
 
Share this answer
 
v2
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[^]
 
Share this answer
 
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.
 
Share this answer
 

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