This is a migrated thread and some comments may be shown as answers.

RadPDFViewer fit To Coordinates

1 Answer 122 Views
PDFViewer
This is a migrated thread and some comments may be shown as answers.
Jürgen
Top achievements
Rank 1
Jürgen asked on 09 Aug 2017, 09:14 AM

Hi,

I would like to know, if it is possible to fit to a type of "box"-Coordinates inside the PDF-Files

I would like to open a pdf and then define the "View" to display.

Could be 4 Points (Left upper/Right upper/Right lower/Left lower) or (Left upper + Width/Height) or something similiar.

Then the PDF-Viewer should scroll to the left upper point and zoom to have the "box" displayed.

Is this possible?

Thanks

Juergen

1 Answer, 1 is accepted

Sort by
0
Peshito
Telerik team
answered on 11 Aug 2017, 11:01 AM
Hello Jürgen,

Yes, this scenario is possible. It can be achieved by creating a Destination object and then using the PdfViewer's GoToDestination method to go to the given destination. For instance:
Destination myDestination = new Location() { Page = this.pdfViewer.Document.Pages[2], Left = 0, Top = 0, Zoom = 3 };
pdfViewer.GoToDestination(myDestination);
You can find more information in this article.

Hope this helps.

Regards,
Peshito
Progress Telerik
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
Tags
PDFViewer
Asked by
Jürgen
Top achievements
Rank 1
Answers by
Peshito
Telerik team
Share this question
or