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

Free Support Forum - aspose.com

ASPOSE.PDF HTML to PDF option gives error in variety of cases of the form Token EndElement in state EndRootElement would result in an invalid XML documen

I am trying to evaluate ASPOSE.PDF and I am running across issues of the form “Token EndElement in state EndRootElement would result in an invalid XML documen” in variety of conditions. I have tried to work on one such case and outlined the bare minimum code that’s required to reproduce it. Note the HTML provided below is just a slimmed down version of the source for easier debugging.

Here is the HTML that causes issues when converting to PDF:

Cover page


1.2 Economic Benefits

1.3 Conclusions


2.0 Terms and Definitions

If you remove the last "


", then it would work fine.

Or if you remove the text “” it would work fine as well.

Can you let me know how to convert HTML like above successfully, and is there any list of such issues that cause HTML to PDF conversion errors? The above case looks very simple and yet causes issues and my bigger sample produces similar errors that I haven’t debugged. Any support on this item would be greatly appreciated so we can plan to go ahead or cancel the purchase of this component.

BTW I am using the latest version of the PDF DLLs with a temporary license.

Hi Kuna,

Thanks for your inquriy. I have tested the scenario with your shared HTML and noticed the reported exception, so logged a ticket PDFNEWNET-40375 in our issue tracking system for further investigation and rectification.

We are sorry for the inconvenience caused.

Best Regards,

The issues you have found earlier (filed as PDFNET-40375) have been fixed in Aspose.PDF for .NET 19.4.