System.ArgumentException: max (150000) < opt (582000)

We’ve received a newsletter which we’re trying to convert into PNG using Aspose.Html. However, it keeps throwing the following exception:

System.ArgumentException: max (150000) < opt (582000)

The “opt” value differs slightly depending on the environment.

Here’s the code to reproduce it:
using (var memStream = new System.IO.MemoryStream())
using (var htmlDoc = new Aspose.Html.HTMLDocument(@“newsletter.html”))
using (var device = new Aspose.Html.Rendering.Image.ImageDevice(memStream))
using (var renderer = new Aspose.Html.Rendering.HtmlRenderer())
{
renderer.Render(device, htmlDoc);
}

And here’s the HTML file that’s causing this issue.
newsletter.zip (9.7 KB)

Can you please investigate what’s causing this issue for this particular HTML and provide a fix?

Best regards,
Greg

@grzegorz.brose,

We have logged an investigation ticket as HTMLNET-2536 in our issue tracking system. We will further investigate the scenario in details and keep you posted with the status of ticket resolution. Please spare us little time.

We are sorry for the inconvenience.

The issues you have found earlier (filed as HTMLNET-2536) have been fixed in Aspose.HTML for .NET 21.1.