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

GoToPage issue

3 Answers 79 Views
PDFViewer
This is a migrated thread and some comments may be shown as answers.
Tamas
Top achievements
Rank 1
Tamas asked on 30 Mar 2016, 11:57 AM

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?

3 Answers, 1 is accepted

Sort by
0
Deyan
Telerik team
answered on 04 Apr 2016, 11:10 AM
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.
0
Tamas
Top achievements
Rank 1
answered on 04 Apr 2016, 11:20 AM

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.

0
Deyan
Telerik team
answered on 07 Apr 2016, 10:33 AM
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.
Tags
PDFViewer
Asked by
Tamas
Top achievements
Rank 1
Answers by
Deyan
Telerik team
Tamas
Top achievements
Rank 1
Share this question
or