Microsoft Windows Phone 8.1 support ends (13 Jul 2017)

Microsoft has ended support for Windows Phone 8.1

Questions about Windows 8.1, 10, WindowsPhone, Windows UWP

Showing Pages Preview and scrolling horizontally

More
IP: 192.168.0.71 8 years 6 months ago - 8 years 5 months ago #12881 by Bouzidi
Hi,

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. imgur.com/a/XXUnU

Is there any way to do that with PDFVCanvas ?
Last edit: 8 years 5 months ago by Bouzidi.
More
IP: 192.168.0.71 8 years 6 months ago #12882 by nermeen

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, 
More
IP: 192.168.0.71 8 years 5 months ago - 8 years 5 months ago #12908 by Bouzidi
Hi,

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.

Is there any solution to optimize that ?

Waiting for you response.
Thanks,
Last edit: 8 years 5 months ago by Bouzidi.
More
IP: 192.168.0.71 8 years 5 months ago #12909 by nermeen
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.
More
IP: 192.168.0.71 8 years 5 months ago - 8 years 5 months ago #12910 by Bouzidi
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. i.imgur.com/VGDLHHq.jpg
Last edit: 8 years 5 months ago by Bouzidi.
More
IP: 192.168.0.71 8 years 5 months ago #12914 by nermeen
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
Time to create page: 0.429 seconds
Powered by Kunena Forum