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

TOPIC:

iOS PDF horizontal scroll with uneven heights 7 years 2 months ago #11877

  • matthew.perkins@lesmills.com
  • matthew.perkins@lesmills.com's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 3
  • Thank you received: 0
Hey guys,

I have an issue when trying to view a PDF with uneven heights.
The desired functionality is to show the pdf with it fitting to the width of the device and be able to scroll to the bottom of that page. then swipe horizontally to go to the next page and the next page should snap to the top.

I have managed to get the page to fit the width by setting PDFView height by
rect.size.height = CGFloat(self.mDoc!.getPagesMaxSize().cy / self.mDoc!.getPagesMaxSize().cx) * rect.width
However, when I scroll down the page after a small distance I can no longer scroll horizontally.

I have attached the PDF in question. Any ideas what is messing up the horizontal scroll?
ps. I am using view mode = 3

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

Last edit: by matthew.perkins@lesmills.com.

iOS PDF horizontal scroll with uneven heights 7 years 2 months ago #11891

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

you have to customize the vLayout method of the view mode in use to set the correct page rect (probably you have already done it) but also manage correctly the m_docw value, used to define the scrollview contentSize.

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

  • Page:
  • 1
Powered by Kunena Forum