Get page number - RadaeePDF.com
Signin/Signup with: 
Welcome, Guest
Username: Password: Remember me
13 Jul 2017
Microsoft has ended support for Windows Phone 8.1
Read More...
Questions about iOS development and PDF
  • Page:
  • 1

TOPIC: Get page number

Get page number 4 years 4 weeks ago #7496

  • Rossi
  • Rossi's Avatar Topic Author
  • Offline
  • Senior Boarder
  • Senior Boarder
  • Posts: 49
  • Karma: 1
  • 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 4 years 4 weeks ago #7498

  • emanuele
  • emanuele's Avatar
  • Offline
  • Moderator
  • Moderator
  • Posts: 516
  • Karma: 15
  • Thank you received: 56
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