Acquire the current page being displayed in WPF Pdf Viewer
9 Jul 20261 minute to read
PDF Viewer supports acquiring the index of the page being displayed in the PDF Viewer at any moment using the CurrentPageIndex property. The following code example illustrates the same.
using Syncfusion.Windows.PdfViewer;
//Initialize PDF Viewer.
PdfViewerControl pdfViewer1 = new PdfViewerControl();
//Load the PDF.
pdfViewer1.Load("Sample.pdf");
// Acquiring the index of the page being displayed in the Viewer
int pageIndex = pdfViewer1.CurrentPageIndex;Imports Syncfusion.Windows.PdfViewer
'Initialize PDF Viewer.
Dim pdfViewer1 As New PdfViewerControl()
'Load the PDF.
pdfViewer1.Load("Sample.pdf")
' Acquiring the index of the page being displayed in the Viewer
Dim pageIndex As Integer = pdfViewer1.CurrentPageIndex