ConvertHtml fails with Aspose.Html 23.5.0

Using versions up to 23.4.0 work as expected.

When upgraded to 23.5.0, this code fails:

        using (HTMLDocument document = new HTMLDocument(html, basePath))
        {
            PdfSaveOptions options = new PdfSaveOptions();
            Aspose.Html.Converters.Converter.ConvertHTML(document, options, outputFileName);
        }

Error:

Aspose.Html.Dom.DOMException: The document is not completely loaded. Please wait for ‘complete’ state.

@dbartle

Would you please try using 23.7 version of the API as this is the latest one. In case issue still persists, please share your sample HTML with us in .zip format so that we can test the scenario in our environment and address it accordingly.

Yes I see the same problem with 23.7. File attached.test.zip (135.1 KB)

Test project attachedAsposeHtmlConverter.zip (20.7 KB)

@dbartle

We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): HTMLNET-4754

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.

@dbartle

We have run the test example you provided; the issue was reproduced.

Then, we have created 2 new solutions, one by example of yours, containing a class library and a test library, and another as a console application. Both of them use .NET Framework 4.8 and call HTML conversion by the same way and on the same source document. In both new solutions the DOMException issue doesn’t appear with Aspose.HTML for .NET v.23.7 as well as 23.5 and 23.6. So the reason may be in your solution, please try to use one we provided.

Now the issue cause still is unclear, and we’ll proceed investigating it.
AsposeHtmlConvertConsole.zip (13.8 KB)
AsposeHtmlConvertTest.zip (19.2 KB)

PS: We supposed that the described failure may be caused by some specific user’s project settings, such as version mappings being manually set up in App.config.