We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

HTML validation

I need to be able to validate HTML before converting it to PDF. How do I do that using aspose.html ?


Can you please explain a bit more like how you want to validate your HTML file before conversion? Please share some samples with us along with details of your requirements so that we can proceed further to assist you accordingly.

I am writing API to validate file being uploaded and convert it to PDF. To reproduce my conundrum, take JPG file, change the file extension and load it as aspose.html document. It seems to work even though it doesn’t make sense and obviously the converted PDF file is just bogus. I would have expected there would be an exception raised… I will settle for any other way to validate the file actually contains valid HTML.

BTW, all links for aspose.HTML on https://demos.aspose.com/ are not working: either page not found or link to wrong GIT page


We are working on fixing the links on the site. Meanwhile, you can please check the below links:

Furthermore, we have logged an investigation ticket as HTMLNET-3336 to analyze whether it is feasible to validate the source file or not. We will let you know once the ticket is resolved. Please be patient and spare us some time.

We are sorry for the inconvenience.