NullReferenceException referencing image

Referencing a SVG image using the current latest version, 23.10, causes:
System.NullReferenceException: ‘Object reference not set to an instance of an object.’

    private static void NullReferenceException()
        const string html = "<html><body><img src='' /></body></html>";

        using (var document = new Aspose.Html.HTMLDocument(html, "."))
            Aspose.Html.Converters.Converter.ConvertHTML(document, new PdfSaveOptions(), "out.pdf");


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-5020

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.

1 Like


We were unable to reproduce the NRE in our environment while testing with 23.10 version of the API. Can you please share some more details like your environment information and complete stack trace?