Aspose.Words - Specify Default Fonts

Document doc = new Document(dataPath + "document.doc");

// If the default font defined here cannot be found during rendering then the closest font on the machine is used instead.
FontSettings.setDefaultFontName("Arial Unicode MS");

// Now the set default font is used in place of any missing fonts during any rendering calls.
doc.save(dataPath + "Rendering.SetDefaultFont_Out.pdf");
doc.save(dataPath + "Rendering.SetDefaultFont_Out.xps");

Download Source Code

For More Examples, Please Visit Aspose Docs

Last edited Dec 5, 2014 at 10:32 AM by shoaibkhan, version 1