views:

1152

answers:

3

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

A: 

For viewing PDF documents you can make use of the ITextSharp library. Here is the link:

http://itextsharp.sourceforge.net/

azamsharp
+2  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.

MSalters
A: 

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.

Flupkear