word转化为pdf后所有字体发生变化原word中使用的是宋体转化成pdf后变成等线,强制设置一次字体后,还是不管用。代码如下
FontSettings fs = new FontSettings();
com.aspose.words.Document doc = new com.aspose.words.Document(outWordPath);
fs.setDefaultFontName("宋体");
fs.setFontsFolder("C:\\Windows\\Fonts", false);
doc.setFontSettings(fs);
doc.save(os, SaveFormat.PDF);