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

TOPIC:

Single Page Display with Horizontal Paging? 6 years 5 months ago #13078

  • smccoole
  • smccoole's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 4
  • Thank you received: 0
Hi,
I'm trying out RadaeePdf as a way to do large PDF display in a React Native app. I've managed to get iOS and Android going but I am having issues with Windows UWP. The idea is that this application would run on Surface Pro tablets. I'm trying to set up a single page display that will page Horizontally like view mode 3 on Android. I've looked around and there doesn't seem to be an example or documentation that gives me enough information to do this. Is it possible? If so, How would I go about it?
Thanks!

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

Single Page Display with Horizontal Paging? 6 years 5 months ago #13079

  • nermeen
  • nermeen's Avatar
  • Offline
  • Platinum Member
  • Platinum Member
  • Posts: 962
  • Thank you received: 87
You need to set PDFView.viewMode = 2; and in PDFReaderPage when creating new PDFViewDual(mPDFView) you should do the following:
m_view = new PDFViewDual(mPDFView);
Boolean[] paras = new Boolean[m_doc.PageCount];
 int cur = 0;
 while (cur < paras.Length)
 {
         paras[cur] = false;
         cur++;
}
 ((PDFViewDual)m_view).vSetLayoutPara(null, paras,false);
The following user(s) said Thank You: smccoole

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

Single Page Display with Horizontal Paging? 6 years 5 months ago #13082

  • smccoole
  • smccoole's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 4
  • Thank you received: 0
Thanks nermeen. The single page is displaying in the center of the screen using the code that you provided. It still smooth scrolls thought. Is there an equivalent to g_paging_enabled under iOS?

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

Single Page Display with Horizontal Paging? 6 years 5 months ago #13090

  • nermeen
  • nermeen's Avatar
  • Offline
  • Platinum Member
  • Platinum Member
  • Posts: 962
  • Thank you received: 87
No, because of a limit in the ScrollViewer of Windows.
You can disable m_scroller.IsScrollInertiaEnabled in PDFView.PDFView(Canvas parent), it will limit the continuous scroll.

You can also do the following as a workaround (but it does not have a smooth effect), in vOnTouchUp add:
PDFPos pos = vGetPos(m_w/2, m_h/2);
vGotoPage(pos.pageno);
private void vOnTouchUp(object sender, PointerRoutedEventArgs e)
            {
                ....
                if (m_touched)
                {
                    .....
                }
                if (m_pressed)
                {
                    m_pressed = false;
                    PDFPos pos = vGetPos(m_w/2, m_h/2);
                    vGotoPage(pos.pageno);
                }
            }

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

Single Page Display with Horizontal Paging? 6 years 5 months ago #13096

  • smccoole
  • smccoole's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 4
  • Thank you received: 0
Hmm, ok. I was hoping that there might be something that could be done with HorizontalSnapPointsType but I think to do that the top level container in the ScrollViewer has to implement IScrollSnapPointsInfo which I don't think it does. I'm still getting into Windows development so I wasn't sure if it was something that could be done or not. Thanks!

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

  • Page:
  • 1
Powered by Kunena Forum