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

TOPIC:

Reflow mode in iOS app 8 years 8 months ago #9484

  • digify
  • digify's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 7
  • Thank you received: 0
We're using the PDF viewer to display multi-page PDFs in reflow mode (in an iOS app), and have encountered these problems.
  1. when changing orientation (device rotation), how do we make the reflow view fit to the device screen?
  2. when we scroll to the bottom of the current page, and then go to the next page, the next page will also show the bottom of the image too, is there a way to make the viewer scroll to the top of the image after page changes?
Appreciate your help and advice pls, thanks.

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

Reflow mode in iOS app 8 years 8 months ago #9497

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

you should try to add this method to RDPDFReflowViewController:

- (void)viewWillTransitionToSize:(CGSize)size withTransitionCoordinator:(id<UIViewControllerTransitionCoordinator>)coordinator
{
[m_view setFrame:CGRectMake(0, 0, size.width, size.height)];
[m_view render:m_cur_page:ratio];
}

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

Reflow mode in iOS app 8 years 8 months ago #9505

  • digify
  • digify's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 7
  • Thank you received: 0
Hi Emanuele,
Thank you, that seems to resolve the problem with the screen orientation change (1).
Can you advise on our 2nd problem (2) with getting the page to scroll to the top after a page change pls?
Cheers

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

Reflow mode in iOS app 8 years 7 months ago #9531

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

to fix your second issue you could edit prePage and nextPage methods, in RDPDFReflowViewController:
add something like [m_view scrollRectToVisible:CGRectMake(0, 0, 1, 1) animated:NO]; after [m_view render:m_cur_page:ratio]; and the view will scroll to top when the page changes.

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

  • Page:
  • 1
Powered by Kunena Forum