Is there an easy way to have an HTML form on a webpage that, when the user submits, puts the data into a PDF file and sends it to the receiver?
The webpage is running on .net.
Thanks
If you have C# use one of this libraries : http://csharp-source.net/open-source/pdf-libraries
(I don't use dot net, so I can't really recommend any, sorry)
Have you tried "PDF Vision .Net"? It's a commercial library but the costs of paying justify itself :) Only $150. I think you should try it.
Use this code for the HTML to PDF converting in Asp .NET/C#:
SautinSoft.PdfVision obj = new SautinSoft.PdfVision();
obj.PageStyle.PageSize.A4();
byte [] pdf = obj.ConvertHtmlFileToPDFStream(@"http://www.somesite.com");
if (pdf!= null)
{
Response.Buffer = true;
Response.Clear();
Response.ContentType = "application/PDF";
Response.AddHeader("Content-Disposition:", "attachment; filename=Result.pdf");
Response.BinaryWrite(pdf);
Response.Flush();
Response.End();
Disclaimer: I'm working for this company.
I can also mention another great product of Sautinsoft company. I think you should check them both and then choose the best! The library quite well doing their job and doesn't require any additional components.
This component
HTML to PDF in C#:
SautinSoft.PdfMetamorphosis p = new SautinSoft.PdfMetamorphosis();
p.PageStyle.PageSize.A4();
p.HtmlToPdfConvertFile(@"c:\table.html", @"c:\Result.pdf");