Are you using 23.7 version of the API? Can you please share your sample code snippet and HTML file in .zip format for our reference? We will test the scenario in our environment and address it accordingly.
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-4749
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.
The ticket was logged recently in our issue tracking system and it will be investigated/resolved on a first come first serve basis. We have recorded your concerns and will surely inform you as soon as we make some updates in this regard. Please spare us some time.
We tested the provided code in linux docker and couldn’t reproduce the OutOfMemoryException. Could you share what version of Linux you are using?
Also, when analyzing the provided code and the stack trace, we noticed that the exception occurred at the time of saving to BMP. This format does not compress the image and therefore takes up a lot of space, which is most likely what caused the exception. Could you please use Aspose.Html.Rendering.Image.ImageFormat.Jpeg as an intermediate format? It will take 193 times less memory space and will most likely fix the problem. Here is a code snippet showing how to do it:
private static void CreateBitmap(HTMLDocument document, Stream destination)
{
ImageSaveOptions saveOptions = new ImageSaveOptions(Aspose.Html.Rendering.Image.ImageFormat.Jpeg);
Converter.ConvertHTML(document, saveOptions, new ExistingStreamAdapter(destination));
}
We tested using 23.7 version of the API. Can you please try using the latest version and let us know about the results you got? We will further proceed accordingly.