Aspose.PDF Java HTML-to-PDF duplicates most body elements

Simple test as shown below results in most of the html’s body being duplicated. Oddly, the majority of the body in the resulting PDF is included twice in a row. HTML displays find in browser.

What am I doing wrong?

Blockquote
String tmpHtmlFile = targetFile.getCanonicalPath() + “.html”;
Files.writeString(Paths.get(tmpHtmlFile), html);

    // Initialize HTMLLoadSave Options
    HtmlLoadOptions options = new HtmlLoadOptions();
    //options.setHtmlMediaType(HtmlMediaType.Screen);
    //options.setPageLayoutOption();
    try (com.aspose.pdf.Document doc = new com.aspose.pdf.Document(tmpHtmlFile, options))
    {
        doc.setOptimizeSize(true);
        doc.save(targetFile.getCanonicalPath());
    }

@aweber1nj1
Hi, terribly sorry for the delay, could you please provide the input html if it is possible?
At first glance I don’t see any obvious issues, maybe there’s something with input itself?

Is there a way to upload it privately? It’s not super confidential, but would prefer it was not public domain.

@aweber1nj1
As I remember if you click with left mouse button on user icon, you can choose Message and it will be sent as private message directly to user’s inbox
when you send me I’ll investigate the issue

@aweber1nj1
Thank you for your patience.
I tested and at latest version issue hasn’t reproduced
Could you provide version you are currently using ?

Aspose PDF (java) 26.2 with JDK 17