RadPDFViewer fit To Coordinates

2 posts, 0 answers
  1. Jürgen
    Jürgen avatar
    1 posts
    Member since:
    Aug 2015

    Posted 09 Aug Link to this post

    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

  2. Peshito
    Admin
    Peshito avatar
    523 posts

    Posted 11 Aug Link to this post

    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.
Back to Top