We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Aspose.Words .Net - wrong page count

Hi!

We are using Aspose.Words for .Net. We are using .Net Framework 4.5.2 and our production version of Aspose.Words is 17.9.0.0, however we tried the latest version at this time, 18.8.0.0 and we found the same issue. We are fully licensed.

The issue is that for certain documents, the page count is wrong. Usually it is off by one page but we did find a case where it was off by 3 pages. A bit more about our context: we are dealing with original legal documents that we cannot modify and for statistical purposes we need to obtain their page count. I mention this because I am aware of similar topics where the advice is to re-work the document which is legally impossible in our case.

Here is the portion of the code that obtains the page count, it inserts it in a structure that contains other information about the document:

private void GetStatistiquesDocument(Aspose.Words.Document doc)
{
if (null != doc)
{
//doc.UpdatePageLayout();
int nombrePages = doc.PageCount;

  _donneesBrutes.Add(new DonneeBrute()
  {
  	Champ = StatistiquesDocument.NombreDePages.ToString(),
  	Valeur = nombrePages.ToString(),
  	Source = DonneeBrute.TypeSource.Inconnu
  });

}
}

As you can see, we tried to do an UpdatePageLayout previous to the PageCount but the result was the same. I am attaching a zip document with 2 documents that are off by one page, the zip also includes a text file describing the expected results and what each version of Aspose.Words returned us.

PageCountDetails.zip (86.4 KB)

Thank you in advance for helping us out with this issue!

@soquij

Thanks for your inquiry. We have tested the scenario and have managed to reproduce the same issue at our side. For the sake of correction, we have logged issues for each document in our issue tracking system as WORDSNET-17391 and WORDSNET-17392. You will be notified via this forum thread once these issues are resolved.

We apologize for your inconvenience.

Thank you very much!

We are experiencing more issues with the page count, is it possible to have an estimate as when the issues will be resolved, so we can plan testing them?

Thank you!

@soquij

Thanks for your inquiry. We try our best to deal with every customer request in a timely fashion, we unfortunately cannot guarantee a delivery date to every customer issue. We work on issues on a first come, first served basis. We feel this is the fairest and most appropriate way to satisfy the needs of the majority of our customers.

Unfortunately, there is no ETA available for your issues. We will inform you via this forum thread once there is an update available on them.

You reported this issue in free support forum and it will be treated with normal priority. To speed up the progress of issue’s resolution, we suggest you please check our paid support policies from following link.
Paid Support Policies

A post was split to a new topic: Queries about Paid support

A post was split to a new topic: Document.PageCount returns incorrect value

The issues you have found earlier (filed as WORDSNET-17392) have been fixed in this Aspose.Words for .NET 20.3 update and this Aspose.Words for Java 20.3 update.