网络文件预览 [英] File preview for web
问题描述
我们的CRM系统中有一个文档库,能够上载/下载任何类型的文件.我想知道是否有任何第三方库可以帮助我们建立文件预览机制.换句话说,我们需要在单击文件时显示文件的小预览图像(如果支持的话). 我们至少需要支持以下格式:doc,xls,pdf和所有图像格式.
We have a document library in our CRM system with ability to upload/download files of any type. I wonder if there is any third-party library, that can help us to build file-preview mechanism. In other words, we need to show small preview image of file (if it supports, of course) on clicking on file. We need to support at least formats: doc, xls, pdf and all the image formats.
推荐答案
I suggest you should look closer to GhostScript. Can't tell right now exactly how to perform such tasks with it, but I think, it's capable to do so. At least you can print with it to PDF and then convert PDF to JPG.
要调整图像大小,请使用 ImageMagick 或其他一些控制台程序
To resize images use ImageMagick or some other console program
这篇关于网络文件预览的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!