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

Reflow mode in iOS app

More
10 years 10 months ago #9484 by digify
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.
More
10 years 10 months ago #9497 by emanuele
Replied by emanuele on topic Reflow mode in iOS app
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];
}
More
10 years 10 months ago #9505 by digify
Replied by digify on topic Reflow mode in iOS app
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
More
10 years 10 months ago #9531 by emanuele
Replied by emanuele on topic Reflow mode in iOS app
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.
Time to create page: 0.429 seconds
Powered by Kunena Forum