Document doc = new Document("C:\\Temp\\224153\\in.docx");
HandleDocumentWarnings warningsHandler = new HandleDocumentWarnings();
doc.setWarningCallback(warningsHandler);
doc.save("C:\\Temp\\224153\\awjava-21.1.html");
warningsHandler.printMissingFontDetails();
public static class HandleDocumentWarnings implements IWarningCallback {
public ArrayList listOfFonts = new ArrayList();
public void warning(WarningInfo info) {
if (info.getWarningType() == WarningType.FONT_SUBSTITUTION || info.getWarningType() == WarningType.FONT_EMBEDDING) {
if (!listOfFonts.contains(info.getDescription()))
listOfFonts.add(info.getDescription());
}
}
public void printMissingFontDetails() {
for (int i = 0; i < listOfFonts.size(); i++)
System.out.println(listOfFonts.get(i).toString());
}
}
Document doc = new Document("in.docx");
com.aspose.words.HtmlSaveOptions so = new com.aspose.words.HtmlSaveOptions();
so.setExportFontResources(true);
so.setOfficeMathOutputMode(HtmlOfficeMathOutputMode.MATH_ML);
doc.save("output.html", so);
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.