Acquire number of pages in the document being displayed
The following code can be used to access the total number of pages displayed in the PDF Viewer. Here ‘buffer’ is the byte array read from the PDF file either using FileOpenPicker or from Assets folder, as illustrated in the Viewing PDF section.
PdfLoadedDocument loadedDocument = new PdfLoadedDocument(buffer); pdfViewer.LoadDocument(loadedDocument); //Gets the total page count. int pageCount = pdfViewer.PageCount;
Dim loadedDocument As New PdfLoadedDocument(Buffer) pdfViewer.LoadDocument(loadedDocument) 'Gets the total page count. Dim pageCount As Integer = pdfViewer.PageCount
Was this page helpful? Yes No
Thank you for your feedback!
Thank you for your feedback and comments. We will rectify this as soon as possible!
An unknown error has occurred. Please try again.
Help us improve this page