How to create a .PDF from my .net web page?
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.
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
Comments
-
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 over 11 yearsmany thanks, i have taken a look and can see that this is suitable for C#. Im looking for a tool for VB.
-
Betty B over 11 yearsmany thanks for your help. We used to use Crystal reports but this replaced this with MSoft reporting services a long time ago.
-
Betty B over 11 yearsthanks for the suggestion but i have reviewed the link and this is for C#. Im looking for a tool for VB.
-
Betty B over 11 yearsmanay thanks but i am looking for a tool suitable with VB.
-
Bharath over 11 yearsIt can be used with both c# and vb. Check the sample link: asp.syncfusion.com/demos/reporting/pdf/Import%20and%20Export/…
-
Ryan McDonough over 11 yearsIt'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 over 11 yearsI 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 over 11 yearsCool. You might find a C# to VB.net conversion tool useful. Here's one provided by the good people at Telerik: converter.telerik.com