Docx文件转pdf,替换内容颜色无效

word文件和pdf文件:我确认安装了字体
新建文件夹.zip (73.7 KB)

代码:

public static void main(String[] args) throws Exception{
	com.aspose.words.License license = new com.aspose.words.License();
	license.setLicense("src/test/resources/lic/newlic.lic");

	Document doc = new Document(new FileInputStream("C:\\Users\\Administrator\\Downloads\\000.docx"));
	Map<String, String> map = new HashMap<>();
	map.put("{{主职位}}","888");
	map.put("{{面貌}}","999");
	map.forEach((k,v)->{
		FindReplaceOptions options = new FindReplaceOptions();
		options.getApplyFont().setColor(Color.BLUE);
		try {
			doc.getRange().replace(k, v, options);
		} catch (Exception e) {
			throw new RuntimeException(e);
		}
	});

	FileOutputStream fileOutputStream = new FileOutputStream("C:\\Users\\Administrator\\Downloads\\000.pdf");
	doc.save(fileOutputStream, SaveFormat.PDF);
}

效果图:
第一个替换成功,颜色有效,第二个无效
image.png (74.5 KB)

@humanhuman
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): WORDSNET-25418

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.

The issues you have found earlier (filed as WORDSNET-25418) have been fixed in this Aspose.Words for Java 23.7 update.