How to export textbox values and images to export pdf form
kindly help plz...can you send ssome sample code..plz
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Jaipal ReddyPosted Jun 24, 2015, 10:14 AM
Upendra Pratap ShahiPosted Jun 24, 2015, 8:31 AM
Venkat SPosted Jun 24, 2015, 8:18 AM
Venkat SPosted Jun 24, 2015, 8:07 AM
You Entered:
Upendra Pratap ShahiPosted Jun 24, 2015, 7:49 AM
{
PdfWriter.GetInstance(pdfDoc, System.Web.HttpContext.Current.Response.OutputStream);
pdfDoc.Open();
//Set Font Properties for PDF File
Font fnt = FontFactory.GetFont("Times New Roman", 14);
PdfPTable PdfTable = new PdfPTable(1);
PdfPCell PdfPCell = null;
//Retrieve content from design side
string chk;
chk = "address";
string adr1 = txtadr1.Text;
PdfPCell = new PdfPCell(new Phrase(new Chunk(chk + adr1)));
PdfTable.AddCell(PdfPCell);
string adr2 = txtadr2.Text;
PdfPCell addrchk = new PdfPCell(new Phrase(new Chunk(adr2)));
PdfTable.AddCell(addrchk);
string adr3 = txtadr3.Text;
PdfPCell addrchk1 = new PdfPCell(new Phrase(new Chunk(adr3)));
PdfTable.AddCell(addrchk1);
string cty = txtcty.Text;
PdfPCell cty1 = new PdfPCell(new Phrase(new Chunk(cty)));
PdfTable.AddCell(cty1);
string stat = txtstat.Text;
PdfPCell stat1 = new PdfPCell(new Phrase(new Chunk(stat)));
PdfTable.AddCell(stat1);
string code = txtcode.Text;
PdfPCell code1 = new PdfPCell(new Phrase(new Chunk(code)));
PdfTable.AddCell(code1);
string cntry = txtcntry.Text;
PdfPCell cntry1 = new PdfPCell(new Phrase(new Chunk(cntry)));
PdfTable.AddCell(cntry1);
string mob = txtmbl.Text;
PdfPCell mob1 = new PdfPCell(new Phrase(new Chunk(mob)));
PdfTable.AddCell(mob1);
pdfDoc.Add(PdfTable);
pdfDoc.Close();
Response.ContentType = "application/pdf";
System.Web.HttpContext.Current.Response.Write(pdfDoc);
Response.Flush();
Response.End();
}
catch (Exception ex)
{
Response.Write(ex.ToString());