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

Free Support Forum - aspose.com

Convert HTML to PDF (embedded gif) using Aspose.PDF for .NET - Object reference not set to an instance of an object

Converting an HTML page to pdf with the simple code

            HtmlLoadOptions options = new HtmlLoadOptions();
            Document pdfDocument = new Document(midHtmlStream, options);
            pdfDocument.Save(finalPdfStream);

There is a html with an embedded gif and button links that is not able to convert and is giving the error
“Object reference not set to an instance of an object” on the new Document line " Document pdfDocument = new Document(midHtmlStream, options);"

Attached the zip file with html: 4f7b5995-d6d9-4a04-95cd-b52d38085423.zip

@azamatali,

Thanks for contacting support.

Files are not properly attached. Can you please check and make sure files are attached.

4f7b5995-d6d9-4a04-95cd-b52d38085423.zip (1.7 KB)

@azamatali,

We have tested the scenario in our environment and were able to notice the issue. We have logged it as PDFNET-48048 in our issue tracking system. We will further look into details of the issue and keep you posted with the status of its correction. Please be patient and spare us little time.

We are sorry for the inconvenience.