Hello,
When trying to open HTML file for PDF conversion it fails with System.NullReferenceException .
The code is:
Aspose.Pdf.HtmlLoadOptions options = new Aspose.Pdf.HtmlLoadOptions();
Aspose.Pdf.Document pdfDocument = new Aspose.Pdf.Document(fileNameHtml, options);
@CharactellAspose
We were able to replicate the issue in our environment while testing the scenario using 21.6 version of the API. Therefore, we have logged it as PDFNET-50141 in our issue tracking system. We will further look into its details and keep you posted with the status of its correction. Please be patient and spare us some time.
We are sorry for the inconvenience.
The issues you have found earlier (filed as PDFNET-50141) have been fixed in Aspose.PDF for .NET 22.4.
I have a new similar case where HTML fails to load. After about 2-3 minutes it crashes with “Out of memory” error.
Here is the code snippet
Aspose.Pdf.HtmlLoadOptions loadOptions = new Aspose.Pdf.HtmlLoadOptions();
Aspose.Pdf.Document pdfDocument = new Aspose.Pdf.Document(fileNameHtml, loadOptions);
Here is a link to the failed HTML file:
Link To html Document
@shlomoCh
We tried to download the file using the link you provided but it seems like it requires access permissions. Please share a public link so that we can download it and test the scenario in our environment.
Hi,
I change the link to be public , you should be able to access it now.
Thanks
@shlomoCh
We tested the case using 22.8 version of the API but we could not replicate the issue. Please check the attached generated output for your kind reference. output.pdf (1.4 MB)
Would you kindly try using the latest version of the API and let us know in case you still notice any issues?