Error when converting HTML to PDF - ArgumentException: max (226500) < opt (463276)

Hello,

The attached HTML file cannot be converted to a PDF. It throws the following error:

Exception in thread "main" class com.aspose.html.internal.ms.System.ArgumentException: max (226500) < opt (463276)
com.aspose.html.rendering.HtmlRenderer.render(Unknown Source)
com.aspose.html.rendering.Renderer.render(Unknown Source)
<...>
com.aspose.html.converters.Converter.convertHTML(Unknown Source)

Here is the code that I used, very simple, nothing special:

PdfSaveOptions saveOptions = new PdfSaveOptions();
HTMLDocument doc = new HTMLDocument(html);
Converter.convertHTML(doc, saveOptions, pdf);

The issue is reproducible with the latest Aspose HTML Java 21.12.

Minimal sample file is attached. Originally it was a large HTML email, but I had to remove personal information, so now it’s just an empty file with HTML formatting and styles: minimal-sample.html.7z (598 Bytes)

@igor.rogov

We have logged this problem in our issue tracking system as HTMLJAVA-1224. You will be notified via this forum thread once this issue is resolved.

We apologize for your inconvenience.