Save a Word file into HTML format with an image covering the texts

Hi

I use Aspose Word 17.2 to save a Word into HTML format, with page splitter from Github.

In the result of this file, the image covers the text. This is different from the Word file.

Please check this issue and the attachment.

P.S. Here is my code

@Test
public void testForAspose()
{
    String fileName = "CPCR.docx";
    try
    {
        Document doc = new Document("input/" + fileName);
        Document pageDoc;
        LayoutCollector layoutCollector;
        DocumentPageSplitter splitter;
        ByteArrayOutputStream output = new ByteArrayOutputStream();
        HtmlSaveOptions saveOp = new HtmlSaveOptions();
        saveOp.setExportImagesAsBase64(true);
        saveOp.setExportTextInputFormFieldAsText(false);
        saveOp.setExportTocPageNumbers(true);
        saveOp.setExportPageSetup(true);
        saveOp.setExportDocumentProperties(true);
        saveOp.setExportRelativeFontSize(false);
        //saveOp.setUpdateFields(true);
        layoutCollector = new LayoutCollector(doc);
        doc.updatePageLayout();
        splitter = new DocumentPageSplitter(layoutCollector);
        byte[] outputContent;
        String outputPath = "output/";
        String dirName = fileName;
        File outputDir = new File(outputPath + "/" + dirName + "/");
        if (!outputDir.exists())
            outputDir.mkdir();
        ByteArrayOutputStream testOut = new ByteArrayOutputStream();
        for (int page = 1; page <= doc.getPageCount(); page++)
        {
            System.out.println("page:" + page);
            pageDoc = splitter.getDocumentOfPage(page);
            testOut.reset();
            output.reset();
            pageDoc.save(output, saveOp);
            outputContent = output.toByteArray();
            IOUtils.write(outputContent, new FileOutputStream(outputPath + "/" + dirName + "/" + page + ".html"));
        }
    }
    catch (Exception e)
    {
        e.printStackTrace();
    }
}

Hi there,

Thanks for your inquiry. We have tested the scenario and noticed the reported issue. We have logged a ticket WORDSNET-15525 in our issue tracking system for further investigation and rectification. We will notify you as soon as it is resolved.

We are sorry for the inconvenience.

Best Regards,