How to create a .PDF from my .net web page?

12,749

Solution 1

You can use one of numerous libraries to generate PDFs from your pages. There is a walkthrough here (it uses iTextSharp, but others are available - have a Google around).

Solution 2

I would suggest using a library such as PDFSharp to create a PDF manually, with the data you need.

http://www.pdfsharp.com/

Trying to convert the html & css to a PDF normally is very flaky and I would say the best option would be to create the document separately using a PDF library (read PDFSharp) and give the user that.

Demo code for Vb.net:

http://www.pdfsharp.net/wiki/HelloWorld-sample-VB.ashx?AspxAutoDetectCookieSupport=1

Solution 3

You can use Syncfusion Essential PDF.

Product link
http://www.syncfusion.com/products/reporting-edition/pdf

Online demo link: http://asp.syncfusion.com/demos/reporting/pdf/Import%20and%20Export/HtmlToPdf/CS/Default.aspx

Share:
12,749
Betty B
Author by

Betty B

New to .Net technologies.

Updated on June 04, 2022

Comments

  • Betty B
    Betty B almost 2 years

    Im using visual studio 2010 (VB) to build a web site for my customers. They have a simple web form that they fill out to log electronically minutes of meeting notes. They would like to have this web form converted into a .PDF file when completed and e-mailed round to the list of users.

    Can anyone point me in the direction of any tools that are able to help with converting the data from the web page into a .PDF?

  • Betty B
    Betty B over 11 years
    many thanks, i have taken a look and can see that this is suitable for C#. Im looking for a tool for VB.
  • Betty B
    Betty B over 11 years
    many thanks for your help. We used to use Crystal reports but this replaced this with MSoft reporting services a long time ago.
  • Betty B
    Betty B over 11 years
    thanks for the suggestion but i have reviewed the link and this is for C#. Im looking for a tool for VB.
  • Betty B
    Betty B over 11 years
    manay thanks but i am looking for a tool suitable with VB.
  • Bharath
    Bharath over 11 years
    It can be used with both c# and vb. Check the sample link: asp.syncfusion.com/demos/reporting/pdf/Import%20and%20Export‌​/…
  • Ryan McDonough
    Ryan McDonough over 11 years
    It's just a library, I wrote code in VB.net for PDF sharp. Just add the reference to the dll and check out: pdfsharp.net/wiki/…
  • Betty B
    Betty B over 11 years
    I have managed to find some sample code for iTextSharp in VB and will see if i can develop this sample code for my site. many thanks.
  • immutabl
    immutabl over 11 years
    Cool. You might find a C# to VB.net conversion tool useful. Here's one provided by the good people at Telerik: converter.telerik.com