Page Number Does Not Correspond to The Actual Page
Closed this issue ยท 12 comments
The page number displayed on the PdfScrollThumb widget does not correspond to the actual page of the PDF displayed when scrolled
on my Android Phone,
Android Version 13, Samsung galaxy 7",
Package Version: pdfrx 1.0.62
Please fix it,
Thank you so much
It is actually a very difficult task to determine which page is the user's concern.
At the first version, pdfrx determines the current page by getting the page number of the page which has the most largest area in the view. But it may not be correct if each page has different size...
What should it be do you think? Or could you please tell me when you think it's a wrong page number?
I have the same issue. I am using arrows to go to the next/previous page, and is not showing actual page number. Only when I scroll a bit (around 20px bottom) it shows then the real page number. Otherwise shows the previous page number
I'm facing the same issue.
I have a pdf carousel that calls the goToPage function when clicking on an item. There are some items that when clicked do not trigger the onPageChanged callback or change the pageNumber correctly, only when scrolled a little it shows the actual page number/triggers the onPageChanged callback
I have the same issue. Any thoughts?
I'm having the same issue. Scrolling does not work properly in some of the itens in a list.
It should not behave this way.
Everyone is just complaining. What is the correct behavior? Could you please introduce me any partial code to realize it?
I'll create an app to show the problem, @espresso3389 . I'll share it here soon.
pdfrx_poc.mp4
In the example I created, when clicking on the next button (>) or on the thumbnail, the page on screen should be updated, as well as the current page number.
As you can see in the video, I navigate between multiple pages. From page 4 to 5 or from page 1 to 3. They all work correctly (Both updated: the rendered page and the current page number), but when I navigate from page 1 to 2 using the goToPage() method, the rendered page is updated, but not the page number.
Current behavior:
While I'm on page 1, when I click on the page 2 thumbnail or in the next button, the page on the screen changes correctly, but the current page number is not updated.
Expected behavior:
While I'm on page 1, when I click on the page 2 thumbnail or in the next button, the page on the screen should update as well as the current page number.
Other information: This bug varies from page to page depending on the file used for displaying.
Devices where I tested and the bug occurred:
Web - Chrome and Brave
Android - Google Pixel emulator with Android 12, Motorola Moto G 60 with Android 12, Motorola Moto E4 Plus with Android 7.7.1
I have the same issue.
When I scroll to the bottom of the document, the property pageNumber not matching with the end of page. I suppose it is caused by the penultimate is still visible ?
Can you help me/us ?
Using :
PdfViewerScrollThumb(
controller: _controller,
orientation: ScrollbarOrientation.right,
thumbSize: const Size(80, 40),
thumbBuilder: (context, thumbSize, pageNumber, controller) => Container(
color: Colors.black.withOpacity(0.35),
child: Center(
child: Text(
"${controller.pageNumber.toString()}/${controller.pages.length.toString()}",
style: const TextStyle(
color: Colors.white,
fontWeight: FontWeight.bold,
fontSize: 16)))))
WIP: Page Number Does Not Correspond to The Actual Page
This fix works for me, thanks !
But there still be several problems...
There still several issues if we see the viewer consisntency but they should be discussed as other specific issues.
So anyway close the issue.