如何预览文档?
我正在开发一个文件共享网站,我需要一种方法来截取上传文档的屏幕截图。
该网站将支持多种文件格式,从纯文本到办公文档(doc、xls、ppt...)、视频(mpeg、avi、...)、图像(jpg、gif、png、...)、PDF 每个文档都
需要有一个“预览”,好的一点是客户希望以下格式有预览:doc、xls、ppt 和 pdf。 其他文件格式是可选的,如果我能找到一种方法来获取它们,它们将有预览。
此外,图像不是问题,因为我只需要在预览中包含缩略图。 另外,我将使用 FFMPEG 将视频转换为 FLV,这样我也可以使用它来截取视频的屏幕截图。
我正在考虑使用支持 Office 和 Open Office 格式的 JODconverter ,我不知道是否可以可以转换为 JPG,但至少可以转换为 PDF,这很不错。 该网站是在运行在专用 Debian 服务器上的 Drupal 5 下用 PHP 构建的,因此如果我选择 JOD,我将使用它作为在同一台计算机的虚拟服务器中运行的 Web 服务。
有谁知道将文件转换为图像的更好的应用程序或方法?
任何帮助将不胜感激,提前致谢!
哈维尔
I'm working on a file sharing website, I need a way to take screenshots of the uploaded documents.
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.
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.
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.
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!
Javier
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
Windows 缩略图查看器是一个 COM 对象,它实现 IExtractImage< /a>. 它开箱即用,支持多种文件类型,并且应用程序可以添加自己的文件类型。 通过依赖该界面,您更有可能获得对您今天可能没有考虑过的其他文档类型的免费支持。
The Windows Thumbnail Viewer is a COM object which implements IExtractImage. Out of the box it supports many file types, and applications can add their own. By relying on that interface, you're more likely to get free support for other document types you might not even have considered today.
我最终使用 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.
要查看 PDF 文档,您可以使用 ITextSharp 库。 这是链接:
http://itextsharp.sourceforge.net/
For viewing PDF documents you can make use of the ITextSharp library. Here is the link:
http://itextsharp.sourceforge.net/