How to convert an ASP or JSP page to PDF?

This question was posted multiple times on Stack Overflow: on Oct 11 '12 by Giti, on Jun 28 '12 by user1482442, on Aug 3 '09 by JCdowney, and so on.

The pdfHTML add-on parses HTML and CSS. That's it.

ASP.Net, JSP, MVC, Razor, Struts, Spring, etc, are all HTML frameworks iText and pdfHTML are 100% unaware of. The same goes for DataGridViews, Repeaters, Templates, Views, etc. which are all framework-specific abstractions. It is not up to pdfHTML –nor iText for that matter– to interpret ASP, JSP, or any other syntax.

It is your responsibility to get the HTML from your choice of framework. If you have an ASP file, run it through your ASP framework to create the HTML. The pdfHTML add-on will gladly accept that HTML for conversion to PDF.

Ready to use iText?

Try our iText 7 Library and add-ons FREE for 30 days. Test your proof of concept, and see if our solution is right for you.

Get my FREE trial

Still have questions? 

We're happy to answer your questions. Reach out to us and we'll get back to you shortly.

Contact us
Stay updated

Join 11,000+ subscribers and become an iText PDF expert by staying up to date with our new products, updates, tips, technical solutions and happenings.

Subscribe Now