Signin/Signup with: 
Welcome, Guest
Username: Password: Remember me
Questions about Windows 8.1, 10, WindowsPhone, Windows UWP
  • Page:
  • 1

TOPIC:

Showing Pages Preview and scrolling horizontally 6 years 6 months ago #12881

  • Bouzidi
  • Bouzidi's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 13
  • Thank you received: 0
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 ?

Please Log in or Create an account to join the conversation.

Last edit: by Bouzidi.

howing Pages Preview and scrolling horizontally 6 years 6 months ago #12882

  • nermeen
  • nermeen's Avatar
  • Offline
  • Platinum Member
  • Platinum Member
  • Posts: 962
  • Thank you received: 87

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, 
The following user(s) said Thank You: Bouzidi

Please Log in or Create an account to join the conversation.

Showing Pages Preview and scrolling horizontally 6 years 6 months ago #12908

  • Bouzidi
  • Bouzidi's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 13
  • Thank you received: 0
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,

Please Log in or Create an account to join the conversation.

Last edit: by Bouzidi.

Showing Pages Preview and scrolling horizontally 6 years 6 months ago #12909

  • nermeen
  • nermeen's Avatar
  • Offline
  • Platinum Member
  • Platinum Member
  • Posts: 962
  • Thank you received: 87
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.
The following user(s) said Thank You: Bouzidi

Please Log in or Create an account to join the conversation.

Showing Pages Preview and scrolling horizontally 6 years 6 months ago #12910

  • Bouzidi
  • Bouzidi's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 13
  • Thank you received: 0
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

Please Log in or Create an account to join the conversation.

Last edit: by Bouzidi.

Showing Pages Preview and scrolling horizontally 6 years 6 months ago #12914

  • nermeen
  • nermeen's Avatar
  • Offline
  • Platinum Member
  • Platinum Member
  • Posts: 962
  • Thank you received: 87
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
The following user(s) said Thank You: Bouzidi

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
Powered by Kunena Forum