Signin/Signup with: 
Welcome, Guest
Username: Password: Remember me
Questions about Android development and PDF
  • Page:
  • 1

TOPIC:

Get wrong Page number 9 years 8 months ago #6789

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

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

Get wrong Page number 9 years 8 months ago #6792

  • radaee
  • radaee's Avatar
  • Offline
  • Moderator
  • Moderator
  • Posts: 1123
  • Thank you received: 73
using OnPageChanged to check page NO.

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

Get wrong Page number 9 years 8 months ago #6797

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

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

  • Page:
  • 1
Powered by Kunena Forum