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

TOPIC:

Get page number 9 years 6 months ago #7496

  • Rossi
  • Rossi's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
  • Posts: 49
  • Thank you received: 0
Hi,I use PDFVDual with pagedEnabled but with this setting i can't get the current page correctly.

I use this code to get the current page:
-(int)getPageNo{
    struct PDFV_POS pos;
    [m_view vGetPos:&pos];
    return pos.pageno;
}

it refresh the page number only every two page.
How i can fix it?

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

Get page number 9 years 6 months ago #7498

  • emanuele
  • emanuele's Avatar
  • Offline
  • User is blocked
  • User is blocked
  • Posts: 580
  • Thank you received: 67
Hi,

[m_view vGetPos:&pos]; return the pos calculated with x=0 and y=0.

if pagingEnabled is YES, the page number will always be the number of the page on the left.

you should create a new method in PDFView class, something like

-(void)vGetPos:(struct PDFV_POS*)pos withPoint(CGPoint *)point
{
[m_view vGetPos:pos :point.x :point.y];
}

to get the page number based on a defined position of the screen.

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

  • Page:
  • 1
Powered by Kunena Forum