We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Convert Throws Error!

public static void main(String[] args) throws Throwable {
License wordLicense = new License();
wordLicense
.setLicense(new FileInputStream(
"D:\\Landray\\AttConverter\\FileConverter\\AsposeConverter\\HTMLConverter\\config\\license\\Aspose.Total.Java.lic"));
Document wordDocument = new Document("C:\\Users\\Lixp\\Desktop\\1.docx");
wordDocument.acceptAllRevisions();
HtmlFixedSaveOptions saveOptions = new HtmlFixedSaveOptions();
saveOptions.setPrettyFormat(true);
saveOptions.setExportEmbeddedCss(true);
saveOptions.setExportEmbeddedFonts(true);
saveOptions.setExportEmbeddedImages(true);
saveOptions.setExportEmbeddedSvg(true);
saveOptions.setWarningCallback(new com.aspose.words.IWarningCallback() {
@Override
public void warning(com.aspose.words.WarningInfo warningInfo) {
System.out
.println(warningInfo.getWarningType() == com.aspose.words.WarningType.FONT_SUBSTITUTION ? ("Font substitution: " + warningInfo
.getDescription()) : "");
}
});
OutputStream outputStream = null;
int pageCount = wordDocument.getPageCount();
for (int i = 0; i < pageCount; i++) {
saveOptions.setPageIndex(i);
saveOptions.setPageCount(1);
outputStream = new FileOutputStream(
"C:\\Users\\Lixp\\Desktop\\1\\convert" + "_page-" + i
+ ".html");
wordDocument.save(outputStream, saveOptions);
outputStream.close();
}
}



Hi there,

Thanks for your inquiry. We have tested the scenario and have managed to reproduce the same issue at our side. For the sake of correction, we have logged this problem in our issue tracking system as WORDSNET-13231. You will be notified via this forum thread once this issue is resolved.

We apologize for your inconvenience.

The issues you have found earlier (filed as WORDSNET-13231) have been fixed in this .NET update and this Java update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.

Ok ,It works well ,Thanks!