- Posts: 3
- 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 Android development and PDF
Get wrong Page number
IP: 192.168.0.71
11 years 7 months ago #6789
by livekus
Get wrong Page number was created by livekus
I set def_view in default_config to 3
and than test this method
public void OnPDFPageDisplayed(Canvas canvas, PDFVPage vpage)
{ System.out.println(vpage.GetPageNo());
}
this method view runs when I press device screen, I slide to page number 2 and i get wrong result ,such
1
0
1
0
1
0
.
.
.
1
0
it should be
1
1
1
1
1
1
.
.
.
1
1
1
with this error I can't handle my xml lay out to print on the page that i want
and than test this method
public void OnPDFPageDisplayed(Canvas canvas, PDFVPage vpage)
{ System.out.println(vpage.GetPageNo());
}
this method view runs when I press device screen, I slide to page number 2 and i get wrong result ,such
1
0
1
0
1
0
.
.
.
1
0
it should be
1
1
1
1
1
1
.
.
.
1
1
1
with this error I can't handle my xml lay out to print on the page that i want
IP: 192.168.0.71
11 years 7 months ago #6792
by radaee
Replied by radaee on topic Get wrong Page number
using OnPageChanged to check page NO.
IP: 192.168.0.71
11 years 7 months ago #6797
by livekus
Replied by livekus on topic Get wrong Page number
sorry, this is my fault , I need to handle the android widget with code below.
//get page bounding in view. just do it, if you need these codes.
//int left = vpage.GetVX(m_view.vGetX());
//int top = vpage.GetVY(m_view.vGetY());
//int right = left + vpage.GetWidth();
//int bottom = top + vpage.GetHeight();
//float mark_left = left + (right - left) / 16;
//float mark_right = mark_left + (right - left) / 8;
//float mark_top = top + (bottom - top) / 16;
//float mark_bottom = mark_top + (bottom - top) / 8;
this is what I want , actually. the problem happen when I slide to change page number two or other page , sometime xml is not appear at their position.
i check this value
System.out.println(vpage.GetVX(m_view.vGetX()));
when I slide to other page and press in screen of device, some page show out put as below
2
(+-)(width of screen of device (+-) 2) **(+-) some + some -
2
(+-)(width of screen of device (+-) 2)
2
(+-)(width of screen of device (+-) 2)
2
(+-)(width of screen of device (+-) 2)
2
(+-)(width of screen of device (+-) 2)
2
(+-)(width of screen of device (+-) 2)
2
(+-)(width of screen of device (+-) 2)
...
...
2
(+-)(width of screen of device (+-) 2)
it should be
2
2
2
2
2
2
...
...
2
2
2
this problem happen Since 2.9.10 ( Since Changing OnPoschange )
the version 2.9.9 is match what I want, but search engine for some language not work until 2.9.13
In this version , this search engine work great for language that i support. You have any advice of this problem
Thank you in advance
//get page bounding in view. just do it, if you need these codes.
//int left = vpage.GetVX(m_view.vGetX());
//int top = vpage.GetVY(m_view.vGetY());
//int right = left + vpage.GetWidth();
//int bottom = top + vpage.GetHeight();
//float mark_left = left + (right - left) / 16;
//float mark_right = mark_left + (right - left) / 8;
//float mark_top = top + (bottom - top) / 16;
//float mark_bottom = mark_top + (bottom - top) / 8;
this is what I want , actually. the problem happen when I slide to change page number two or other page , sometime xml is not appear at their position.
i check this value
System.out.println(vpage.GetVX(m_view.vGetX()));
when I slide to other page and press in screen of device, some page show out put as below
2
(+-)(width of screen of device (+-) 2) **(+-) some + some -
2
(+-)(width of screen of device (+-) 2)
2
(+-)(width of screen of device (+-) 2)
2
(+-)(width of screen of device (+-) 2)
2
(+-)(width of screen of device (+-) 2)
2
(+-)(width of screen of device (+-) 2)
2
(+-)(width of screen of device (+-) 2)
...
...
2
(+-)(width of screen of device (+-) 2)
it should be
2
2
2
2
2
2
...
...
2
2
2
this problem happen Since 2.9.10 ( Since Changing OnPoschange )
the version 2.9.9 is match what I want, but search engine for some language not work until 2.9.13
In this version , this search engine work great for language that i support. You have any advice of this problem
Thank you in advance
Time to create page: 0.471 seconds