Click here to Skip to main content
15,178,008 members
Please Sign up or sign in to vote.
2.00/5 (1 vote)
See more:
how to export a web page to pdf in button click in web page have some controls like lables and dropdown dropdown list selected index changed i have to bind lables data from my sql.every time user have to save this page as pdf formate with binded data.
Abdul Quader Mamun 17-Jul-12 0:25am
there is a third-party dill HTMLtoPDF available to do this.
Venkateswara Rao Reddipalli 17-Jul-12 0:29am
ya i did but only this dlls export page based on url.not working on dropdown list selected index changed
Abdul Quader Mamun 17-Jul-12 1:12am
actually it not possible to predict everything when total code is invisible.

Hi, you can check this discussion: webpage to PDF[^]
Venkateswara Rao Reddipalli 17-Jul-12 1:40am
hi, i am using this convertapi.dll.but this dll convert web page based on my page have some asp controls like lables and dropdown lists.lables text changed on dropdown selection.i want to convert currently execute page to pdf
JonathanSterling 10-Jun-15 5:42am
Pandvi the discussion is gone, nevertheless the Prasad_Kulkarni's answer provides a lot of options. Additionally I know of another option which I found to be a life saver, check this C# library for Word documents.

It has a straightforward API which enables creating of PDF file with C# in a LINQ like manner, like this:
var document = new DocumentModel();
  new Section(document,
    new Paragraph(document, "Sample")));

But also it provides a direct C# API that converts HTML content into a PDF file and a direct exporting of PDF file to an ASP.NET client, like this:
DocumentModel.Load("index.html").Save(this.Response, "Document.pdf");

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