DocumentPages Property
Gets or sets collection of document pages. Note that pages are numbered from 1 in collection.

Namespace: Aspose.Pdf
Assembly: Aspose.PDF (in Aspose.PDF.dll) Version: 20.3
Syntax
public PageCollection Pages { get; }

Property Value

Type: PageCollection
Examples
Example below demonstrates how to operate with the document pages: How to obtain number of pages and how to obtain rectangle of starting page of the document.
C#
Aspose.Pdf.Document document = new Aspose.Pdf.Document("sample.pdf");
Aspose.Pdf.PageCollection pages = document.Pages;
System.Console.WriteLine("Document contains " + pages.Count);
Page page = pages[1];
Rectangle rect = page.Rect;
See Also