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

Free Support Forum - aspose.com

StructuredDocumentTag - ContentsFont not working

I’ve noticed that when checking the properties of the StructuredDocumentTag are not reported correctly as far as font-weight, font-size etc. I’ve tried both of these properties:


Is this a known bug?

Any help is appreciated

Hi Bruno,

Thanks for your inquiry.

Please note that formatting is
applied on a few different levels. For example, let’s consider
formatting of simple text. Text in documents is represented by Run
element and a Run can only be a child of a Paragraph. You can apply
formatting 1) to Run nodes by using Character Styles e.g. a Glyph Style, 2) to the parent of those Run nodes i.e. a Paragraph node (possibly via paragraph Styles) and 3) you can also apply direct formatting to Run nodes by using Run attributes (Font). In this case the Run will inherit formatting of Paragraph Style, a Glyph Style and then direct formatting.

Please try the Run.Font property to get the font of Run nodes inside content control.

It would be great if you please share following detail for investigation purposes.

  • Please attach your input Word document.
  • Please

    create a standalone/runnable simple application (for example a Console
    Application Project) that demonstrates the code (Aspose.Words code) you used to reproduce this issue.

As soon as you get these pieces of information to
us we’ll start our investigation into your issue.

Hi Tahir, I actually started to do this and glad that you confirmed this is the correct way. Seems to be working ok…Thanks

Hi Bruno,

Thanks for your feedback. Please feel free to ask if you have any question about Aspose.Words, we will be happy to help you.