Htm to PDF conversion stack overflow

When a high number of nested div tags are used in a HTM file, the application crashes due to a stack overflow exception. I have attached an example fileemail.zip (1.0 KB)

@philipcrossland

Could you please share the sample code snippet as well so that we can test the scenario accordingly and share our feedback with you.

Hi, this is the code we are using

Private Function HtmlToPdf(source As MemoryStream) As Byte()
        
        Dim saveOptions = New AP.PdfSaveOptions()
       
        Using doc As New AP.Document(source, New AP.HtmlLoadOptions)
            Using destination As New MemoryStream
                doc.Save(destination, saveOptions)
                Return destination.ToArray
            End Using
        End Using
End Function

Thanks

@philipcrossland

We were able to reproduce the issue at our end while using Aspose.PDF for .NET 21.1. Therefore, have logged an issue as PDFNET-49296 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-49296) have been fixed in Aspose.PDF for .NET 22.7.