Aspose.words pagecount api seems not working again

hi ,
i hava a word:
1234.zip (15.8 KB)

var aspDocument = new Aspose.Words.Document(filename);
return aspDocument.PageCount;

the api returns 2

i used ExtractPages api to extra pages,

aspDocument.ExtractPages(0, 1).Save("1.docx")
aspDocument.ExtractPages(1, 1).Save("2.docx")

i got the below 2 files
O.zip (30.5 KB)

but actually there is just 1 page on ms word.

my aspose.words version is 21.8.0
please have a look .

@vs6060_qq_com The problem is not reproducible on my side using the latest 24.5 version of Aspose.Words.
The problem on your side might occur because the fonts used in your input document are not available on the machine where document is processed. The fonts are required to build document layout and calculate page count. If Aspose.Words cannot find the font used in the document, the font is substituted. This might lead into fonts mismatch and document layout differences due to the different fonts metrics and as a result incorrect page count. You can implement IWarningCallback to get notifications when font substitution is performed.
Please see our documentation to learn where Aspose.Words looks for fonts:
https://docs.aspose.com/words/net/specifying-truetype-fonts-location/

hi Alex,

according your suggestion,i changed my code to implement IWarningCallback interface.

i got the below warnning message:

Table column widths may need to be calculated. Rendered column widths could differ.
At Table 1, Cell 1, Row 1, Table 1, Section 1

can you please tell me how to change the 1234.docx to reslove above warnings.

thank you

@vs6060_qq_com Unfortunately, it is difficult to tell how to modify the document to avoid all warnings. The warnings purpose is to inform that the document layout might be changed upon rendering. Unfortunately, in this case it does not help to resolve the problem.
As I have mentioned the problem is not reproducible on my side using the latest 24.5 version of Aspose.Words. So I would suggest you to update to the latest version to avoid the problem.