doc.getPageCount return incorrect value

I used aspose to createa docx, I used doc.getPageCount, but returned an incorrect value. The attachment is my docx
I do not know how to get the correct pageCounttest.zip (689.8 KB)

@jxsgy,

Thanks for your inquiry. Please ZIP and attach following fonts here for testing. We will investigate the issue and provide you more information on this.

  • 宋体
  • MingLiU_HKSCS
  • MS Mincho
  • 仿宋

@tahir.manzoor The fonts is all the fonts you mentioned,thank you very much
宋体 ----> simsun.ttc
MingLiU_HKSCS ----> mingliub.ttc
MS Mincho ----> MSMINCHO.TTF
仿宋 ----> simfang.ttf

@jxsgy,

Thanks for sharing the detail. We have tested the scenario and have managed to reproduce the same issue at our side. For the sake of correction, we have logged this problem in our issue tracking system as WORDSNET-15703. You will be notified via this forum thread once this issue is resolved.

We apologize for your inconvenience.

I am using aspose.words for java 17.4.0

@jxsgy,

We managed to reproduce this issue using latest version of Aspose.Words for Java 17.7. We will inform you via this forum thread once this issue is resolved.

We apologize for your inconvenience.

@tahir.manzoor
The problem has been solved, my doc used the table, the second column
Builder.getCellFormat (). SetPreferredWidth (PreferredWidth.AUTO);

Now i used it
Builder.getCellFormat (). SetWidth (300.0);

GetPageCount is correct

@jxsgy,

It is nice to hear from you that you have solved your issue. Please feel free to ask if you have any question about Aspose.Words, we will be happy to help you.