I have requirement to convert .html file to PDF format to load in browser.
I have created .HTML file using asp.net C# , I need render that HTML to PDF format in default.aspx page.
How i can convert HTML page to PDF format rendered this PDF format in defualt aspx page with out using any third party controls.
Abhishek YadavPosted Feb 8, 2024, 12:29 PM
To convert an HTML page to PDF format in C#, you can make use of the iTextSharp library.
Here's a step-by-step guide on how to do it:
Install the iTextSharp library using NuGet Package Manager or download it from the iText website.
Add a reference to the iTextSharp library in your C# project.
Create a new PDF document using the Document class from the iTextSharp library.
Dhiraj PoojaryPosted Feb 7, 2024, 9:33 AM
You may find helpful information regarding HTML to PDF conversion in the following link:
https://stackoverflow.com/questions/564650/convert-html-to-pdf-in-net#:~:text=EDIT%3A%20New%20Suggestion%20HTML%20Renderer%20for%20PDF%20using%20PdfSharp
Leon DPosted Feb 6, 2024, 6:22 AM
Check this:
https://www.e-iceblue.com/Tutorials/Spire.PDF/Spire.PDF-Program-Guide/Convert-HTML-to-PDF-Customize-HTML-to-PDF-Conversion-by-Yourself.html
Jayraj ChhayaPosted Feb 5, 2024, 12:54 PM
To convert an HTML file to PDF format in a Dot Net application, you can use the iTextSharp library. iTextSharp is a free and open-source library that allows you to create and manipulate PDF documents in Dot Net.
Here's an example of how you can use iTextSharp to convert an HTML file to PDF:
You can customize this example to suit your specific requirements, such as specifying the input and output file paths, adding headers and footers, or applying styles to the PDF document.