I'm wondering if there is something out there where, if I press a button on an asp.net web page, I can programmatically create a pdf of that page and save it to my hard drive.
Asked
Active
Viewed 1,302 times
2 Answers
1
This is a pretty decent product for it, but I don't think it's free.
Here's an example of how it could be used.
var pdfVision = new SautinSoft.PdfVision();
var pdfBytes = pdfVision.ConvertHtmlFileToPDFStream("http://localhost/default.aspx");
//show PDF
Response.Buffer = true;
Response.Clear();
Response.ContentType = "application/PDF";
Response.AddHeader("Content-Disposition:", "attachment; filename=Result.pdf");
Response.BinaryWrite(pdfBytes);
Response.Flush();
Response.End();

ataddeini
- 4,931
- 26
- 34