How to resize HTML to fix Doc

Mac OS 10.14.4
java version “1.8.0_181”
Java™ SE Runtime Environment (build 1.8.0_181-b13)
Java HotSpot™ 64-Bit Server VM (build 25.181-b13, mixed mode)
Aspose: aspose-words-19.7

       Document document = new Document("html path ");
       OoxmlSaveOptions saveOptions = new OoxmlSaveOptions(SaveFormat.DOCX) ;
       if (fileOutputStream != null) {
           document.save("docx output file ", saveOptions);
       }

test.zip (154.1 KB)

@JamesGuo

Please use the following code example to fit the table in the page. Hope this helps you.

Document document = new Document(MyDir + "test.html");
for (Table table : (Iterable<Table>) document.getChildNodes(NodeType.TABLE, true))
{
    table.autoFit(AutoFitBehavior.AUTO_FIT_TO_WINDOW);
}

OoxmlSaveOptions saveOptions = new OoxmlSaveOptions(SaveFormat.DOCX);
document.save(MyDir + "output.docx", saveOptions);

test.docx.zip (147.8 KB)
Not so good

@JamesGuo

You may change the orientation of page as landscape or increase the the page’s width to get the correct output.