Statistics Mismatch

Attached is a sample for file for which the Statistics extracted by Aspose.Word is different to what is shown by MS Word, through the Advanced Properties. Following is the summary:

Aspose derived values As seen from advanced properties in Word
No Of Characters 129 59
No Of Characters With Spaces 150 66
No Of Lines 1 9
No Of Paragraphs 1 4
No Of Words 22 13

Could anyone explain the reason for parity. We’ve noticed that for files that have Unicode data, the parity is higher.


Thanks for your inquiry. Aspose.Words does not update statistics information, it just returns values stored in the document. Here are values of document properties stored in the document:

<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<Properties xmlns="" xmlns:vt="">
	<Application>Microsoft Office Word</Application>
		<vt:vector size="2" baseType="variant">
		<vt:vector size="1" baseType="lpstr">
			<vt:lpstr>Title - مرحبا</vt:lpstr>
	<Manager>Test Manager</Manager>
	<Company>Test Company</Company>

As you can see Aspose.Words returns values stored in the document.
You can update Characters, CharactersWithSpaces, Words and Paragraphs count by calling Document.UpdateWordCount method:
Unfortunately, there is no way to update Lines count. Your request has been linked to the appropriate issue. You will be notified as soon as this feature will be supported. But I cannot promise you that this feature will be available sometime soon. This quite complex issue and not many customers asked about it yet.
Best regards,