GoToPage issue

4 posts, 0 answers
  1. Tamas
    Tamas avatar
    2 posts
    Member since:
    Mar 2016

    Posted 30 Mar Link to this post

    Hello,

    I am experiencing a strange issue when I want to jump to a specific page using the PdfViewer.

    OnDocumentChanged event, I set the CurrentPageNumber or call GoToPage(), but the result will be the end of the (page-1), a tiny line of that page and the page that I am requesting.

    Example.

    I want to jump to page 5. On first jump it shows ok, on second jump it shows a tiny line from page 4 and the page 5, but on the page counter (CurrentPageNumber) it has 4.

    This only occurs on second call onward.

     

    Is this a PdfViewer bug or is there another way I can go to a specific page?

  2. Deyan
    Admin
    Deyan avatar
    136 posts

    Posted 04 Apr Link to this post

    Hello Tamas,

    I have tried to reproduce the described issue but without any success. I have prepared a simplified demo project that allows you to change the document, call GoToPage method in DocumentChanged event handler and display the current page number. Could you please check if you reproduce the issue with this demo? I have tested it with the latest official version of the product.

    Regards,
    Deyan
    the Telerik team
    Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
  3. UI for WPF is Visual Studio 2017 Ready
  4. Tamas
    Tamas avatar
    2 posts
    Member since:
    Mar 2016

    Posted 04 Apr in reply to Deyan Link to this post

    In the mean time I have found the problem.

    The problem comes from ScaleMode functionality. If I set it to ScaleMode.FitToWidth the GoToPage will not work right.

    I found a workaround with ScaleFactor which can be calculated and then the GoToPage goes to the right page also.

  5. Deyan
    Admin
    Deyan avatar
    136 posts

    Posted 07 Apr Link to this post

    Hello Tamas,

    We have managed to reproduce the issue using ScaleMode property. We have added it to this feedback item that is logged for a similar issue. Could you share with us your workaround, so that we can test it on our side and add it to the feedback item?

    Regards,
    Deyan
    the Telerik team
    Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
Back to Top