We are using the Radaee PDFViewerSDK_Win8.1_1.9.33 to read PDF files in our win8.1/win10 applications and we are in use to a two functions when opening PDF viewer with PDFVCanvas horizontally:
- We need to add two arrows to scroll the PDF pages horizontally.
- we need to show/hide a preview of the PDF pages at the bottom of the viewer which follows the main scroll.
You can find in the joined picture more details.
We need to add two arrows to scroll the PDF pages horizontally.
Yes, this can be done by customizing PDFVCanvas and calling it from PDFView.vDraw, and of course adding listeners (You need to implement these features yourself).
we need to show/hide a preview of the PDF pages at the bottom of the viewer which follows the main scroll..
It cannot be done using PDFVCanvas.. Adding a thumbnail view at the bottom causes a performance issue with the main scroll view of windows, that's why we have implemented it separately using PDFThumbPage,
I m working on the implementation of the last features and I would like to ask for your help .
In fact, for scrolling the pages vertically by swiping, I added a grid layout in front of the main scroller to detect the gestures and the call m_scroller.ChangeView to change pages (I m not using the vGetPage because i need scroll animation when changing two adjacent pages).
The problem that each time we scroll pages horizontally, there a white space for refreshing the new page, there is a white space while refreshing the new page.
Which view mode are you using as a base view? (Vertical, horizontal or dual)
Are you calculating the new position in the same way as OnNoneTouchBegin and OnNoneTouchMove in PDFView
In the default behavior PDFView.vGetPage is used inside PDFView.vFlushRange to determine which pages to refresh on the screen, so if vGetPage result is not consistent with your calculations, you will encounter a white page.
Im using the PDFViewHorz and yes I m calculating the new position in the same way as OnNoneTouchBegin and OnNoneTouchMove in PDFView.
In fact, even with the original PDFViewHorz of the RDPDFLIB.win8.1, when you try to scroll Horizontally to the next page, you can see it.
You can find below in the joined picture a snapshot of the fact.
The default behavior is to render pages visible on screen, which are checked using:
int pageno1 = vGetPage(0, 0);
int pageno2 = vGetPage(m_w, m_h);
and when you change page and go to a page out of this range, you can see the white page before it gets rendered (especially if the page content is not just simple text).
So to change this behavior you need to change in vFlushRange or vGetPage inside PDFViewHorz