- Posts: 45
- Thank you received: 0
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
Restrict scroll of pages
IP: 192.168.0.71
8 years 10 months ago #12309
by Pja
Restrict scroll of pages was created by Pja
Hi,
Can we restrict the scrolling of pages to a few pages.
eg. If there is a pdf of 20 pages. I want to view that pdf from 4 to 10 page only and restrict fro viewing other pages.
Can we restrict the scrolling of pages to a few pages.
eg. If there is a pdf of 20 pages. I want to view that pdf from 4 to 10 page only and restrict fro viewing other pages.
IP: 192.168.0.71
8 years 10 months ago #12311
by nermeen
Replied by nermeen on topic Restrict scroll of pages
Which platform your are interested in?
IP: 192.168.0.71
8 years 10 months ago #12405
by Pja
Replied by Pja on topic Restrict scroll of pages
iOS
IP: 192.168.0.71
8 years 10 months ago #12410
by emanuele
Replied by emanuele on topic Restrict scroll of pages
Hi,
there is not a specific method to do that, but you can customize the SDK to reach your needs, in this case you can try different ways:
- Edit the pageCount method of PDFDoc in PDFObjc class and return the last page to show (e.g.. if your pdf file has 20 pages, you can return 5 in this method to show only 5 pages and thumbnails).
- Open the pdf file to minimum page of your range.
- Check if the current page is in your range in OnPageChanged method of PDFView class and use vGoto method to limit the pdf navigation.
there is not a specific method to do that, but you can customize the SDK to reach your needs, in this case you can try different ways:
- Edit the pageCount method of PDFDoc in PDFObjc class and return the last page to show (e.g.. if your pdf file has 20 pages, you can return 5 in this method to show only 5 pages and thumbnails).
- Open the pdf file to minimum page of your range.
- Check if the current page is in your range in OnPageChanged method of PDFView class and use vGoto method to limit the pdf navigation.
IP: 192.168.0.71
8 years 9 months ago #12416
by Pja
Replied by Pja on topic Restrict scroll of pages
I need to achieve this in scroll view. Also i don't want to alter the pages of the original document. I just want to give the user access only to the set of pages. eg. in a pdf of 10 pages. i want to give the user access to pages 2 to 4.
IP: 192.168.0.71
8 years 9 months ago #12447
by emanuele
Replied by emanuele on topic Restrict scroll of pages
You can do it with the vGoto method as described in points 2 and 3
Time to create page: 0.406 seconds