Microsoft Windows Phone 8.1 support ends (13 Jul 2017)

Microsoft has ended support for Windows Phone 8.1

Questions about iOS development and PDF

Get page number

More
IP: 192.168.0.71 11 years 5 months ago #7496 by Rossi
Get page number was created by Rossi
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:
Code:
-(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?
More
IP: 192.168.0.161 11 years 5 months ago #7498 by emanuele
Replied by emanuele on topic Get page number
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.
Time to create page: 0.439 seconds
Powered by Kunena Forum