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

Free Support Forum - aspose.com

Font changed in saved .rtf document

Hi,


When I open the attached “eula.1037.rtf” document and change the font of every run to “Arial”, the font in saved file “eula.1037-font-change.rtf” is changed to Courier New. Can you check this?

Here’s the code I used:

Document document = new Document(“eula.1037.rtf”);
document.accept(new DocumentVisitor() {
@Override
public int visitRun(Run run) throws Exception {
run.getFont().setName(“Arial”);
run.getFont().setNameBi(“Arial”);
return super.visitRun(run);
}
});
document.save(“eula.1037-font-change.rtf”, SaveFormat.RTF);

I’m using Aspose.Words 14.3.0.

Thanks,
Zeljko
Hi Zeljko,

Thanks for your inquiry. We tested the scenario and have managed to reproduce the same problem. For the sake of correction, we have logged this problem in our issue tracking system as WORDSNET-12489. Our product team will further look into the details of this problem and we will keep you updated on the status of correction. We apologize for your inconvenience.

Best regards,

@Zeljko,

The issues you have found earlier (filed as WORDSNET-12489) have been fixed in this Aspose.Words for .NET 17.11 update and this Aspose.Words for Java 17.11 update.

Please also check the following articles: