如何实现PHP/jQuery在线文档查看器


How to implement PHP / jQuery Online Document viewer?

我的应用程序是在PHP Yii框架中开发的。我的应用程序有一个专用网络模块,网络成员可以在其中上传文件以便在他们之间共享。现在我正在使用AmazonS3来保存这些文件。我有没有办法提供一个选项来为这些文件生成预览,这样用户就可以在下载文件之前在线查看它们。

以下是我在研究中遇到的问题:

Group Docs:
http://groupdocs.com/pricing/api-pricing. This is paid version and I'm not sure about the privacy of my documents. 
Zoho Docs
https://www.zoho.com/docs/
I'm not sure if they have an API to support the document viewing feature.
Google Drive(Formerly Google Docs)
https://developers.google.com/drive/
I'm not sure if I can only open the documents using Google Drive and not save to them on google drive.

这些文件是非常私人的,在我的应用程序中,安全性是非常重要的。

如果有人对这种情况有任何建议/想法,请与我分享。

感谢

请尝试此链接,它将帮助您

Document Viewer是一个jQuery plugin,它允许您直接在网页中查看多种文件格式。Document Viewer支持的文件格式有:

  • PDF文件
  • 文本文件
  • 代码–bsh、c、cc、cpp、cs、csh、css、cyc、cv、htm、html、java、js、m、mxml、perl、php、pl、pm、py、rb、sh、xhtml、xml、xsl、sql、vb
  • 图像–png、jpg、jpeg、gif
  • 音频–mp3、m4a、oga、webma、fla
  • 视频–m4v、ogv、ogg、webmv、flv、mpg、mpeg、mov、divx、avi

是的,我正在使用它。

多种文件类型的2种选择:

  1. 使用谷歌文档查看器5简单快速一些限制和免费)

  2. 使用Pdf.js,它非常擅长动态显示Pdf,而不会像谷歌查看器那样让每个页面都变成图像,你可以搜索和选择文本和其他令人惊叹的东西,这在Firefox上使用。

或者尝试付费服务,他们甚至有文档的3D视图;)