How Can I Reach the page by page number with aspose pdf tool?

Hi,

I want to reach the page by a given page number. Would you like to give me some sample code?

Thank you very much. A quick reply will be appreciated.

Hi Xiaohua,

Thanks for contacting support.

As per my understanding, you need to reach/access particular page inside PDF document using page index. If so is the case, please try using Pages collection of Document object to get particular page instance. Please take a look over following code snippet.

[C#]

// load the PDF document

Document doc = new Document("c:/pdftest/XPS_conversion.pdf");

// get the instance of particular PDF page

Page pdfpage = doc.Pages[1];

// print page dimensions

Console.WriteLine("Page
Width - "
+ pdfpage.PageInfo.Width + "
Page Height - "
+ pdfpage.PageInfo.Height);