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

Free Support Forum - aspose.com

Incorect FontName

Problem is that the method Font.getName() return wrong Font, in Word Document Font is “Calibri (Body)” but method Font.getName() returns “Times New Roman”.
You can chek this problem whit this example:

public class FontNameTest {
@Test
public void fontNameTest() throws Exception {
String path = “d:/”;
Document document = new Document(path + “Document.docx”);
NodeList runs = document.selectNodes("//Run");
Run run = (Run) runs.get(12);
Font font = run.getFont();
System.out.println(run.getText());
System.out.println(font.getName());
}
}

and Document.doc is attached.

Thanks,
Bojan

Hello

Thank you for reporting this problem to us. I managed to reproduce the problem on my side. Your request has been linked to the appropriate issue. You will be notified as soon as it is fixed.

This occurs because font is specified via Word 2007 Theme. When font is specified via theme MS Word shows Theme’s name in round brackets (for example “Calibri(body)”).

I think, I can suggest you a very simple workaround of this issue. Since DOC format does not support MS Word 2007 Themes, formatting specified in themes is converting to direct formatting. So as a workaround, you can save your DOCX document as DOC.

Hope this helps.

Best regards,

Hi,


Do you have same updates of this issue? This is important for us!

Thanks,
Bojan
Hi Bojan,

Thanks for your inquiry. Unfortunately, this issue is not resolved yet. This issue was more complex than we initially estimated. I have verified the status of WORDSNET-3312 from our issue tracking system and regret to share with you that this issue has been postponed till a later date. We will inform you as soon as your issue is resolved. We apologize for any inconvenience.

Best regards,

The issues you have found earlier (filed as WORDSNET-3312) have been fixed in this .NET update and this Java update.


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