I am currently evaluating your product as a replacement to using MS Word's interop calls from our ASP .NET application. The initial setup and coding was easy, however I do have one very serious problem - the word count I get from the aspose words tool differs greatly from the MS Word word count. Unfortunately for us, word counting is critical for our application as our clients get charged per 'chunk' of words they submit to us. I have attached a sample document which contains a range of text, images, 2 pasted excel tables and 1 pasted excel table (pasted as a special object which I don't expect to be counted).
Word calculates the word count to be 740 words - If I count the words manually I also arrive at 740 words. I use two scenarios in aspose.net to count the words:
1) Accessing the BuiltInDocumentProperties.Words WITHOUT calling UpdateWordCount() first and that arrives at 664 words
2) calling UpdateWordCount() first and then accessing the BuiltInDocumentProperties.Words afterwards. That arrives at 418 words
Both hugely differ from the MS Word count and my count by hand! I wouldn't mind a difference of a word or two but this huge difference would make potentially hundreds of dollars of cost difference to us and our clients and thus makes this tool unusable. I am pasting my code below just in case I am doing something wrong here. I hope you can advise me (and quickly) as to why the count is so inaccurate and what I can do about it?
MemoryStream wordDocumentStream = new MemoryStream(wordInputData);
Document doc = new Document(wordDocumentStream);
//Tell the document to update its calculation of the word count in the document
//and then extract the word count itself...
doc.UpdateWordCount(); //I comment this out sometimes to see what difference it makes
int numberOfWords = doc.BuiltInDocumentProperties.Words;