I have some HTML content (including formatting tags such as strong, images etc).In my Java code, I want to convert this HTML content into a PDF document without losing the HTML formatting.
Is there anyway to do it in Java (using iText or any other library)?
I would try DocRaptor.com. It converts html to pdf or html to xls in any language, and since it uses Prince XML (without making you pay the expensive license fee), the quality is a lot better than the other options out there. It’s also a web app, so there’s nothing to download. Easy way to get around long, frustrating coding.
Here are some examples:
https://docraptor.com/documentation#coding_examples