PageCount is not correct

Hi team, I got the wrong PageCount when I tried to use Document.PageCount api.
any suggestions?
The file I used is here Paper_PET_Paper_A3_Portrait_24.zip (51.0 KB)

And also, this document is generated by Aspose.Words sdk.

@TommyZhou

We have tested the scenario using the latest version of Aspose.Words for .NET 19.3 and have not found the shared issue. Please make sure that you have set the license before importing the document into Aspose.Words’ DOM.

Hi tahir,
I’ve set the license in the code.
I just thought that would be related to FontSettings? Because this issue only occurs when using this special font OpenDyslexicfont.zip (119.3 KB)
.

@TommyZhou

After installing font OpenDyslexic-Regular, Document.PageCount returns value 4. MS Word also shows 4 pages. Please check the attached image for detail.

@tahir.manzoor. Many thanks for your response. The previous issue was indeed related to the font setting, and I’ve found the way to solve it.
But, there is another document which PageCount is incorrect again. Could you please be kind to help?
When I use ms office word to open, it shows 12 pages, but when I use Aspose.Word(.net core version 18.6 in NuGet) to load it, the PageCount is 13. I realized after I upgrade the SDK to the newest version (19.4) the PageCount is 12, which is correct. While for some reasons, I couldn’t upgrade… So I want to know if there is any workaround for this?
hardcopy.zip (234.3 KB)

@TommyZhou

It seems that there was a bug in old version of Aspose.Words that has fixed in the latest version of Aspose.Words 19.4.

Please note that we do not provide support for older released versions of Aspose.Words. Moreover, we do not provide any fixes or patches for old versions of Aspose products either. All fixes and new features are always added into new versions of our products.

We always encourage our customers to use the latest version of Aspose.Words as it contains newly introduced features, enhancements and fixes to the issues that were reported earlier.

@tahir.manzoor,
Thanks for your reponse.
But the PageCount is still incorrect in my environment, even I am using the newest version of Aspose.Words Net.
The document which has this issue is tool hardcopy.zip (86.7 KB)
The code is as simply as ‘new Document’ and then ‘Document.PageCount’.
Please help. Thanks in advance.

@TommyZhou

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-18539. You will be notified via this forum thread once this issue is resolved.

We apologize for your inconvenience.

@tahir.manzoor
Many thanks.
I just want to know if there is a due date when the issue can be resolved?
As the project which I am working on is heavily rely on this function. I need to have a schedule on this.

@TommyZhou

Thanks for your inquiry. Your issue ( WORDSNET- 18539 ) has been postponed due to missing feature WORDSNET-4794 ( Support cell spacing in layout ) that is related to your issue.

After the fix of WORDSNET-4794, we will look into your issue. We will be sure to inform you via this forum thread as soon as your issue is resolved.

We apologize for your inconvenience.

@tahir.manzoor
I found another document which also has the PageCount incorrect issue (In word the page count is 3 while aspose tells 4). Could you please help to identify if this is related to WORDSNET-4794 ( Support cell spacing in layout ) or others? Thanks in advance.
hardcopy2.zip (54.4 KB)

@TommyZhou

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-18786. You will be notified via this forum thread once this issue is resolved.

We apologize for your inconvenience.

@tahir.manzoor
Thanks for your response.
Is it possible to let me know which feature does this issue related to? As I am in a project which rely on the PageCount function, I am trying to find out a workaround before WORDSNET-18786 resolved.

@TommyZhou

At the moment cell spacing is ignored in tables while rendering document. This causes difference in layout sizing and visual output. We will inform you via this forum thread once there is an update available on this issue.

Please call Document.UpdateTableLayout method as shown below as a workaround of this issue.

Document doc = new Document(MyDir + "hardcopy2.docx");
doc.UpdateTableLayout();
Console.WriteLine(doc.PageCount);

The issues you have found earlier (filed as WORDSNET-18786) have been fixed in this Aspose.Words for .NET 22.2 update also available on NuGet.

The issues you have found earlier (filed as WORDSNET-18539) have been fixed in this Aspose.Words for .NET 22.8 update also available on NuGet.