TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Surya Narayana
NA
3
2.2k
Please help this below query
Sep 24 2012 2:24 AM
Hi Frriends,
I have created Pdf file from SharePoint List data
DataTable dt = GetProductsData();
GridView GridView1 = new GridView();
GridView1.DataSource = dt;
GridView1.DataBind();
Response.Clear();
Response.Buffer = true;
Response.Charset = "";
Response.ContentType = "application/pdf";
Response.AddHeader("content-disposition", "attachment;filename=CustomerInfo.pdf");
StringWriter sWriter = new StringWriter();
HtmlTextWriter hTWriter = new HtmlTextWriter(sWriter);
GridView1.RenderControl(hTWriter);
StringReader sReader = new StringReader(sWriter.ToString());
Document pdf = new Document(PageSize.A4);
HTMLWorker worker = new HTMLWorker(pdf);
PdfWriter.GetInstance(pdf, Response.OutputStream);
pdf.Open();
worker.Parse(sReader);
pdf.Close();
Response.Write(pdf);
Response.Flush();
Response.End();
its working fine but i want store this Pdf file in to my document library please can you help this query
Regards,
Surya
Reply
Answers (
2
)
how to hide the tabs in top link bar from unauthorized users.
How to get threaded conversation from SharePoint 2010 Discussion List?