Hi David,
Thanks for contacting Syncfusion support.
Based on your update we suspect that your use case scenario is to center the loaded document page, if that so, it is not feasible to load document page to be centric, but we can use PdfViewerControl. ScrollTo(horizontalOffset, verticalOffset) method to scroll to the particular position. And also, we can use PdfViewerControl.ScrollChanged event to get the position values.
UG Link:
Please find the code snippet below to scroll the PDF document in PdfViewerControl,
// Load the PDF document.
pdfviewer.Load(@"../../Data/Windows Store Apps Succinctly.pdf");
// Occurs when changes are detected in the scroll position.
pdfviewer.ScrollChanged += Pdfviewer_ScrollChanged;
private void Pdfviewer_ScrollChanged(object sender, ScrollChangedEventArgs args)
{
// Get the current offset.
verticalOffset = args.VerticalOffset;
}
private void Scroll_Click(object sender, RoutedEventArgs e)
{
// Scroll to the specified offset.
pdfviewer.ScrollTo(verticalOffset + 20);
}
|
Can you kindly explain us more about on your requirement and the use case scenario in details? This information will be helpful for us to analyze more from our side and provide you a better solution.
Regards,
Divya