I’m trying to get pages amount in word (.docx) document using sample that is shown on the official site: Get document info | Documentation.
For each document I’w tried I receive fewer pages that it really contains.
Document:
Vdjfhvbjdhfvbdjhfvjdhfbv.docx (16,6 КБ)
Code:
using (Converter converter = new Converter(“C:\path\Desktop\Vdjfhvbjdhfvbdjhfvjdhfbv.docx”))
{
IDocumentInfo info = converter.GetDocumentInfo();
WordProcessingDocumentInfo docInfo = (WordProcessingDocumentInfo)info;
Console.WriteLine("Pages count: {0}", docInfo.PagesCount);
}
Lib version:
GroupDocs.Conversion 24.2.0