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

Free Support Forum - aspose.com

Initialization of the default font doesn't seems to be done correctly for docx

With office 2007, i create a simple text without changing font (the default font is calibri).

If i save the file in 97-2003 format and ask :

doc.Sections[0].Body.Paragraphs[0].Runs[0].Font.Name

I receive "Calibri".

If i do the same but save the file in office 2007 (docx format), and ask the font name too

I receive "Times New Roman".

If i call doc.PageCount, then after for the same question, i receive the correct value "Calibri".

It seems than calling PageCount force complete initialization of the document, otherwise Font is not inilialize correctly.

Hi Jacques,

Thanks for your inquiry. Could you please attach your input Word document, you're getting problems with, here for testing? I will investigate the issue on my side and provide you more information.

Best Regards,

i give you 2 files.

the default one (docx), and the working one (.doc).

Hi Jacques,


Thanks
for the additional information. While using latest Aspose.Words 11.2.0. I managed
to reproduce this problem on my side. I have logged your issue as WORDSNET-6173 into our
bug tracking system. Your request has also been linked to the appropriate
issue. Once we sort it out, we will let you know. Sorry for inconvenience.

Hi there,


Thanks for your inquiry.

This issue occurs because Aspose.Words does not provide public API for retrieving theme information. We will inform you as soon as this feature is available.

In the mean time, the work around is, as you found, to convert the document to DOC format first and then retrieve the font settings.

Thanks,

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


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