- Posts: 4
- Thank you received: 0
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
Single Page Display with Horizontal Paging?
IP: 192.168.0.71
8 years 4 months ago #13078
by smccoole
Single Page Display with Horizontal Paging? was created by smccoole
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!
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!
IP: 192.168.0.71
8 years 4 months ago #13079
by nermeen
Replied by nermeen on topic Single Page Display with Horizontal Paging?
You need to set PDFView.viewMode = 2; and in PDFReaderPage when creating new PDFViewDual(mPDFView) you should do the following:
Code:
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);
IP: 192.168.0.71
8 years 4 months ago #13082
by smccoole
Replied by smccoole on topic Single Page Display with Horizontal Paging?
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?
IP: 192.168.0.71
8 years 4 months ago #13090
by nermeen
Replied by nermeen on topic Single Page Display with Horizontal Paging?
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:
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:
Code:
PDFPos pos = vGetPos(m_w/2, m_h/2);
vGotoPage(pos.pageno);
Code:
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);
}
}
IP: 192.168.0.71
8 years 4 months ago #13096
by smccoole
Replied by smccoole on topic Single Page Display with Horizontal Paging?
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!
Time to create page: 0.401 seconds