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,
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 or access a particular page inside a PDF document using a page index. If that is the case, please try using the Pages collection of the Document object to get a particular page instance.Please take a look at the 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);