简体   繁体   English

如何在幻灯片中显示pdf文件?(iphone应用程序开发)

[英]How to display pdf files in slideshow?(iphone application development)

In my project, I need to fetch some pdf files from server and display them in a slideshow.The slide show should contain the first page of each pdf or a preview image of each pdf and while clicking it, the particular pdf file should be open up. 在我的项目中,我需要从服务器获取一些pdf文件并以幻灯片形式显示它们。幻灯片放映应该包含每个pdf的第一页或每个pdf的预览图像,并且在点击它时,特定的pdf文件应该是打开的起来。 Is there any ios sdk available for implementing this functionality. 是否有任何ios sdk可用于实现此功能。

As far as I know there is nothing like that available in the iOS SDK. 据我所知,iOS SDK中没有类似的东西。 You will have to do it yourself. 你必须自己做。 As mentioned in the Thread I posted in the comment, the ZoomingPDFViewer Example of Apple is a good place to start learning how to show a pdf. 正如我在评论中发布的主题中所提到的,Apple的ZoomingPDFViewer示例是开始学习如何显示pdf的好地方。 If I understand you right, you won´t need the zooming stuff so you can leave it out. 如果我理解你的话,你就不需要缩放的东西,所以你可以把它留下来。 Then show your pdfs in a view controller with some gesture recognizers to give the user the possibility to switch between them and then a double click gesture recognizer to open it. 然后在带有一些手势识别器的视图控制器中显示您的pdf,以便用户可以在它们之间切换,然后双击手势识别器将其打开。 And that is it. 就是这样。

Edit to Fogmeister´s comment: As he mentioned you can use the UIPageViewController to switch between the pdf thumbnails. 编辑到Fogmeister的评论:正如他所提到的,你可以使用UIPageViewController在pdf缩略图之间切换。

对于幻灯片放映,您可以使用tableview或集合视图并查看PDF以查看此https://github.com/vfr/Reader

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM