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

Free Support Forum - aspose.com

How to Switch Default-Font on loading html-Document

Aspose complements HTML-Document on Loading with style informations. See below input- and output-html. Our concern is to overwrite the used default font (Times New Roman). How can this be achieved?

Sample Sourcecode:
FontSettings settings = FontSettings.getDefaultInstance();
InputStream htmlInputStream = …;
LoadOptions loadOptions = new LoadOptions();
Document document = new Document(htmlInputStream, loadOptions);
String result = document.toString(SaveFormat.HTML)

image.png (6.9 KB)

image.png (10.9 KB)


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-15643. You will be notified via this forum thread once this issue is resolved.

We apologize for your inconvenience.