Dear sir/ mam
I want create .pdf file with the help of store procudure in sql server. How we can create????
Thanks & Regards
Suraj bhoir
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.
Purvesh SanganiPosted Sep 20, 2017, 2:23 AM
{
for (int i = 0; i < Grv.Columns.Count; i++)
{
if ((Convert.ToString(Grv.Columns[i].HeaderText) == "Edit") || (Convert.ToString(Grv.Columns[i].HeaderText) == "Delete"))
{
Grv.Columns[i].Visible = false;
}
}
System.Web.HttpContext.Current.Response.ContentType = "application/pdf";
System.Web.HttpContext.Current.Response.AddHeader("content-disposition", "attachment;filename=" + PdfName + ".pdf");
System.Web.HttpContext.Current.Response.Cache.SetCacheability(HttpCacheability.NoCache);
StringWriter sw = new StringWriter();
HtmlTextWriter hw = new HtmlTextWriter(sw);
Grv.AllowPaging = false;
Grv.AllowPaging = false;
Grv.RenderControl(hw);
StringReader sr = new StringReader(sw.ToString());
Document pdfDoc = new Document(PageSize.A2, 7f, 7f, 7f, 0f);
HTMLWorker htmlparser = new HTMLWorker(pdfDoc);
PdfWriter.GetInstance(pdfDoc, System.Web.HttpContext.Current.Response.OutputStream);
pdfDoc.Open();
htmlparser.Parse(sr);
pdfDoc.Close();
System.Web.HttpContext.Current.Response.Write(pdfDoc);
System.Web.HttpContext.Current.Response.End();
}
Ravi Kiran ChanduriPosted Aug 27, 2017, 2:20 AM
Ankit SharmaPosted Aug 23, 2017, 6:09 AM
Manikandan MurugesanPosted Aug 23, 2017, 2:54 AM
suraj BhoirPosted Aug 23, 2017, 2:47 AM
Manikandan MurugesanPosted Aug 23, 2017, 2:43 AM