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

TOPIC:

On Button click want to show next page 4 years 1 month ago #14908

  • apdeveloper
  • apdeveloper's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
  • Posts: 67
  • Thank you received: 0
Dear Team,
I want to show next page or previous on button click.

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

On Button click want to show next page 4 years 1 month ago #14909

  • radaee
  • radaee's Avatar
  • Offline
  • Moderator
  • Moderator
  • Posts: 1123
  • Thank you received: 73
sorry, some methods seems not implement on ios.
this method shall be easy, plz add following codes to class PDFLayoutView
-(void)vGotoPage:(int)pageno
{
    if(!m_layout) return;
    RDVPage *vp = [m_layout vGetPage:pageno];
    if(!vp) return;
    self.contentOffset = CGPointMake([vp GetX]/m_scale_pix, [vp GetY]/m_scale_pix);
    //[self scrollRectToVisible:CGRectMake([vp GetX]/m_scale_pix, [vp GetY]/m_scale_pix,
    //  [vp GetWidth]/m_scale_pix, [vp GetHeight]/m_scale_pix) animated:YES];
}
and then, in your ViewController, you shall invoke [PDFLayoutView vGotoPage:pageno];
this method not tested, we shall test on next days.

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

Last edit: by radaee.

On Button click want to show next page 4 years 1 month ago #14910

  • emanuele
  • emanuele's Avatar
  • Offline
  • User is blocked
  • User is blocked
  • Posts: 580
  • Thank you received: 67
Dear user,
If you are using RDLoPDFViewController, you could use vGetCurrentPage of PDFLayoutView class to get the current page:
int page = [m_view vGetCurrentPage];
then use PDFGoto method of RDLoPDFViewController class to change page.
[self PDFGoto:page];
PDFGoto calls vGoto method of PDFLayoutView.

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

  • Page:
  • 1
Powered by Kunena Forum