问题
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.
回答1:
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.
To resize images use ImageMagick or some other console program
来源:https://stackoverflow.com/questions/6734037/file-preview-for-web