How can I take preview of documents?
Asked Answered
G

3

6

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

Greataunt answered 6/10, 2008 at 18:18 Comment(0)
G
1

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.

Greataunt answered 7/1, 2009 at 21:47 Comment(2)
How did you created document viewer in flash and what did you use for conversionOvershoot
You can also use swfrender (another SWFTool) to further convert swf to png image. swfrender.exe input.swf -o output.pngSpoonful
S
3

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.

Simian answered 10/10, 2008 at 13:42 Comment(0)
G
1

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.

Greataunt answered 7/1, 2009 at 21:47 Comment(2)
How did you created document viewer in flash and what did you use for conversionOvershoot
You can also use swfrender (another SWFTool) to further convert swf to png image. swfrender.exe input.swf -o output.pngSpoonful
B
-3

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

http://itextsharp.sourceforge.net/

Biauriculate answered 6/10, 2008 at 18:35 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.