8

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

bluish
  • 26,356
  • 27
  • 122
  • 180
Daniel
  • 89
  • 1
  • 8

5 Answers5

2

Umbraco has a good PDF generator package called "XSL to PDF".

It wil allow you to generate a PDF file from Umbraco just by defining a PDF template.

Using this you should be able to achieve what you are looking for.

bluish
  • 26,356
  • 27
  • 122
  • 180
Tim
  • 4,414
  • 4
  • 35
  • 49
1

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)

fingerman
  • 2,440
  • 4
  • 19
  • 24
1

I have been using PDFsharp a lot.. Does the job!

StefanE
  • 7,578
  • 10
  • 48
  • 75
1

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();
Jyoti
  • 11
  • 1
0

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.

PDF Metamorphosis .Net

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");
Alexis Pigeon
  • 7,423
  • 11
  • 39
  • 44
Magnetty
  • 9
  • 1
  • 1
    Please don't make it a habit of answering only posts that promote your company's products. I appreciate that you disclose your affiliation, but please try to make contributions to the site that are more than just for your company's products. – casperOne Nov 23 '12 at 12:39