RadaeePDF.com :: Topic: Get wrong Page number (1/1)
Welcome, Guest
Username: Password: Remember me

Signin/Signup with:

Questions about Android development and PDF

TOPIC: Get wrong Page number

Get wrong Page number 2 years 11 months ago #6789

  • livekus
  • livekus's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 2
  • Karma: 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
The administrator has disabled public write access.

Get wrong Page number 2 years 11 months ago #6792

  • radaee
  • radaee's Avatar
  • OFFLINE
  • Moderator
  • Posts: 825
  • Thank you received: 10
  • Karma: 43
using OnPageChanged to check page NO.
The administrator has disabled public write access.

Get wrong Page number 2 years 11 months ago #6797

  • livekus
  • livekus's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 2
  • Karma: 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
The administrator has disabled public write access.
Powered by Kunena Forum