18
I have tried a lot on google but not able to find..
Any help is appreciated.
Please find the code below:-
protected void Page_Load(object sender, EventArgs e)
{
StreamReader read = new StreamReader(@"D:\queryUnicode.txt", Encoding.Unicode);
string str = read.ReadToEnd();
Paragraph para = new Paragraph(str);
FileStream file = new FileStream(@"D:\Query.pdf",FileMode.Create);
Document pdfDoc = new Document();
PdfWriter writer = PdfWriter.GetInstance(pdfDoc, file );
pdfDoc.Open();
pdfDoc.Add(para);
pdfDoc.Close();
Response.Write("Pdf file generated");
}