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

Free Support Forum - aspose.com

Control chars in font name 49

Hi,

I have problem with rtf files. Text in the first file has font name that consist of two characters 0xB and 0xC.Text in the second file has font name and bi name that contains the character 0x4.Is this normal?

Code:

Document doc = new Document(“first.rtf”);
Run run = (Run) doc.getChild(NodeType.RUN, 837, true);
System.out.println(run.getFont().getName());


Document doc = new Document(“second.rtf”);
Run run = (Run) doc.getChild(NodeType.RUN, 0, true);
System.out.println(run.getFont().getName());
System.out.println(run.getFont().getNameBi());

Hi Zeljko,

Thanks for your inquiry.
Zeljko:
Document doc = new Document("first.rtf");
Run run = (Run) doc.getChild(NodeType.RUN, 837, true);
System.out.println(run.getFont().getName());
We have tested the scenario and have noticed that Run.Font.Name returns "\v\f". However, MS Word does not show font name for this run node. See the attached image for detail. We have logged this problem in our issue tracking system as WORDSNET-13679 to investigate it. We will inform you via this forum thread once there is any update available on this issue.
Zeljko:
in the second file has font name and bi name that contains the character 0x4.Is this normal?
Yes, you are getting the expected output. Please let us know if you have any more queries.

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


This message was posted using Notification2Forum from Downloads module by aspose.notifier.