如何预览文件? [英] How can I take preview of documents?

查看:174
本文介绍了如何预览文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在一个文件共享网站上,我需要一种方法来拍摄上载文档的屏幕截图.

I'm working on a file sharing website, I need a way to take screenshots of the uploaded documents.

该网站将支持多种文件格式,从纯文本到Office文档(doc,xls,ppt等),视频(mpeg,avi,...),图像(jpg,gif,png等). .),PDF,Open Office等.

The site will support several file formarts, from plain text to office documents (doc, xls, ppt, ...), videos (mpeg, avi, ...), images (jpg, gif, png, ...) PDF's, Open Office, etc.

每个文档都需要对其进行预览",好处是客户希望以下格式具有预览:doc,xls,ppt和pdf.其他文件格式是可选的,如果我可以找到它们的话,它们将具有预览功能.

Each document need to have a "preview" of it, the good part is that the client wants the following formats to have previews: doc, xls, ppt and pdf. The other files format are optionals, they'll have preview if I can find a way to take them.

此外,图像不是问题,因为我只需要在预览中包含缩略图即可.另外,我将使用FFMPEG将视频转换为FLV,因此也可以使用它来拍摄视频的屏幕截图.

Additionally, the images are not a problem because I just need to include a thumbnail in the preview. Also I will use FFMPEG for converting videos to FLV so I can use it for taking screenshots of the videos too.

我当时在考虑使用支持Office和Open Office格式的 JODconverter ,我不支持知道它是否可以转换为JPG,但至少可以转换为PDF之类的东西. 该网站是在专用Debian服务器上运行的Drupal 5下用PHP构建的,因此,如果我选择JOD,我会将其用作在同一台计算机上的虚拟服务器中运行的Web服务.

I was thinking in using JODconverter which supports Office and Open Office formats, I don't know if it converts to JPG but at least it converts to PDF which is somenthing. The site is being build in PHP under Drupal 5 running in a dedicated Debian server so in case that I choose JOD I'll use it as a webservice running in a virtual server in the same machine.

有人知道更好的将文件转换为图像的应用程序或方法吗?

Does anybody knows a better application or method for converting files to images?

任何帮助将不胜感激,在此先感谢您!

Any help will be greatly appreciated, thanks in advance!

哈维尔

推荐答案

我结束了使用JODConverter将所有内容转换为PDF,然后使用了SWFTools从PDF转换为SWF.我使用Flash创建了自己的文档查看器.

I ended using JODConverter for converting everything to PDF and then SWFTools for converting from PDF to SWF. I created my own document viewer using Flash.

到目前为止,它的运行情况非常好.

It's working really well so far.

这篇关于如何预览文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆