Information Required

Greetings!
I’ve been exploring Aspose-Word at the moment for the first time and it seems to be very useful for the product on which i am working on. I need to have some technical information related to the API.

I want to create Word document from my application. And afterwards, i want my application to calculate following statistics related to the document:

– Number of words in bold
– Number of words in italics
– Number of underlined words
– Total number of fonts used in the document
– Total number of font sizes used in the document.

Can you please tell me whether Aspose-Word API supports the fore said statistics ???

Hi,

Thank you for your interest in Aspose.Word.

Aspose.Word API provides all necessary classes and methods for building documents programmatically. It also allows to update and obtain document statistics like total number of words in the document. However, your task seems too custom to be supported by some special methods. You should implement your own logic to calculate such specific statistics. For example, to calculate total numbers of fonts and font sizes used in the document, you should probably do following:

1. Implement two Hashtables (one for font names and another for font sizes);
2. Extract all runs of text from the document (each run has its own font properties);
3. Iterate over the collection of runs and populate the Hashtables;
4. Get count of items in the Hashtables.