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.

Hi

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="http://schemas.openxmlformats.org/officeDocument/2006/extended-properties" xmlns:vt="http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes">
	<Template>Normal.dotm</Template>
	<TotalTime>49</TotalTime>
	<Pages>4</Pages>
	<Words>22</Words>
	<Characters>129</Characters>
	<Application>Microsoft Office Word</Application>
	<DocSecurity>0</DocSecurity>
	<Lines>1</Lines>
	<Paragraphs>1</Paragraphs>
	<ScaleCrop>false</ScaleCrop>
	<HeadingPairs>
		<vt:vector size="2" baseType="variant">
			<vt:variant>
				<vt:lpstr>Title</vt:lpstr>
			</vt:variant>
			<vt:variant>
				<vt:i4>1</vt:i4>
			</vt:variant>
		</vt:vector>
	</HeadingPairs>
	<TitlesOfParts>
		<vt:vector size="1" baseType="lpstr">
			<vt:lpstr>Title - مرحبا</vt:lpstr>
		</vt:vector>
	</TitlesOfParts>
	<Manager>Test Manager</Manager>
	<Company>Test Company</Company>
	<LinksUpToDate>false</LinksUpToDate>
	<CharactersWithSpaces>150</CharactersWithSpaces>
	<SharedDoc>false</SharedDoc>
	<HyperlinksChanged>false</HyperlinksChanged>
	<AppVersion>12.0000</AppVersion>
</Properties>

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:
https://reference.aspose.com/words/net/aspose.words/document/updatewordcount/
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,