Reading document using Font attributes

Hi,

I am trying to read a document using font styles i.e font face, font size and font weight(bold or regular).
When I read it through paragraph nodes, it does not give a proper output.
While the same gives a proper output if it is read through runs.

Please suggest how to read the same using paragraphs.

Thanks in advance.
Tarul

Hi

Thanks for your inquiry. Formatting of text in MS Word documents can be defined on few different levels:

  1. Paragraph style defined for the particular paragraph;
  2. Character style defined for the particular run;
  3. Explicit formatting specified for a particular run.

For more information, please see the following link:
https://docs.aspose.com/words/net/aspose-words-document-object-model/
So you cannot determine whether paragraph has for example bold text by checking just paragraph’s style. There can be a run with bold text.

Hope this helps. Please let me know if you need more assistance, I will be glad to help you.
Best regards,