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())
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?