Free Support Forum - aspose.com

Predefined docx file's style font name is changed during loading


Aspose.Words for Java:

In one docx file, styles are predefined (font name - Calibri (Body))- attached report-letter.docx

Document document = new Document(“report-letter.docx”);
document.save(“test.docx”);

Check saved test.docx and find that all predefined styles’ font names are changed into “Times New Roman”.

Please help.



Hi

<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thanks for your request. This problem is logged in our defect database as issue #5313. I will notify you as soon as it is fixed.

Best regards.


what’s the best workaround?
DocumentBuilder.getFont().setName(specifiedName);

Could Document be set up font’s name rather than DocumentBuilder?

Thanks.

Hi

<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thanks for your inquiry. You can change font of each run in your document:

http://www.aspose.com/documentation/file-format-components/aspose.words-for-.net-and-java/com/aspose/words/run.html#Font

Please see the following link to learn how to change font of the whole document:

Best regards.

It seems that Aspose.words for java USE a default font name rather than the defined paragraph style’s font name during loading DOCX styles into memory. Its fixing should be EASY. Could you guys fix this issue with a patch version ASAP? I need to apply predefined styles into new docx files other otherwise it’s ANNOYING.

Thanks for help.



Hi

<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thanks for your request. This problem also occurs in .NET version of Aspose.Words. So it should be first fixed there and then ported to java. I will consult with our developers regarding this issue and provide you more information.

Best regards.

The issues you have found earlier (filed as 5313) have been fixed in this update.


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