Free Support Forum - groupdocs.com

Document page count


#1

Hello!


Is it possible to get page count for a specific document?
EG:

GetDocumentPageImageHandler imgHandler = new GetDocumentPageImageHandler();
byte[] byteImg = imgHandler.GetDocumentPageImage(filePath, pageIndex, width, quality);

How do i get this “pageIndex” value?

im doing something like this:

int pageIndex = 0;
List<byte[]> imageList = new List<byte[]>();

while(true)
{
byte[] byteImg = imgHandler.GetDocumentPageImage(filePath, pageIndex, width, quality);
pageIndex ++;
if(byteImg.lenght == 0)
break;

imageList.add(byteImg);
}

#2

Hello,


Thank you for your request. For how to get number of the pages in the document please check “Getting the Page Count” chapter in this article .

Best regards.