Declined
Last Updated: 22 May 2023 09:14 by ADMIN
Turk
Created on: 16 May 2023 13:53
Category: PDFViewer
Type: Feature Request
0
RadPdfViewer - zoom to the middle of one page document

Hello,

 

I use RadPdfViewer to view a PDF file in my WPF application, the PDF file has only one page and the contents are in the middle of the page, so I'm trying to zoom and focus on the middle of the page, I use the following code:

private void DocumentChanged(object sender, DocumentChangedEventArgs e)
        {
            pdfViewer.ScaleFactor = 1.3;
            var size = pdfViewer.Document.Pages[0].Size;
            pdfViewer.ScrollToVerticalOffset(size.Height * 0.3);
            pdfViewer.ScrollToHorizontalOffset(size.Width * 0.20);
        }

however, I only see the horizontal scroll working.

How can I zoom then scroll to vertical and horizontal offset?

0 comments