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

Free Support Forum - aspose.com

Some question!

when we use aspose-words-18.8.jar,the old api like this:
saveOptions.setWarningCallback(new IWarningCallback() {
@Override
public void warning(WarningInfo warningInfo) {
if (WarningType.FONT_EMBEDDING == warningInfo.getWarningType()
|| WarningType.FONT_SUBSTITUTION == warningInfo.getWarningType()) {
logger.info(warningInfo.getDescription());
}
}
});

how to do in 18.8?

@hucq_landray_com_cn,

Please try using the following code:

Document doc = new Document("D:\\temp\\input.docx");
doc.setWarningCallback(createWarningCallback());
doc.save("D:\\temp\\awjava-18.8.pdf"); 

Also, please check the following definition of createWarningCallback() method.

private static IWarningCallback createWarningCallback() {
    return new IWarningCallback() {
        public void warning(WarningInfo warningInfo) {
            if (warningInfo.getWarningType() == WarningType.FONT_SUBSTITUTION)
                System.out.println(warningInfo.getWarningType() + ". + " + warningInfo.getSource() + ". " + warningInfo.getDescription());
        }
    };
}