Results 1 to 4 of 4
- 07-04-2009, 12:34 PM #1
Member
- Join Date
- Oct 2007
- Posts
- 5
- Rep Power
- 0
Creating preview images of files in java
Hi all,
How I can convert the first page of a file into an image?
My application allows users to upload files. To see it, as of now, users have
to download and see, which is hard to do.
So I need to create a preview image
of the uploaded file which can be of any type(PDF, doc, txt, xls, ppt, etc.).
How can I do this? I need to show only the first page of the file as an image.
For image files which are uploaded, I am showing a thumb nail size preview,
but for other file types I have to get a way. Even if the preview is not in the for of an image, it will be fine for me. My only aim is to show some content of the file to the user so that he will get an idea of the file. How can I do this?
Expecting some help,
Thanks and regards,
Sandeep.
- 07-04-2009, 03:51 PM #2
You need a separate rendering engine for every file type you want to display. While this is easy for txt, the Office formats will require 3rd party libraries.
Don't forget to mark threads as [SOLVED] and give reps to helpful posts.
How To Ask Questions The Smart Way
- 07-04-2009, 06:15 PM #3
Member
- Join Date
- Oct 2007
- Posts
- 5
- Rep Power
- 0
Thanks for the reply... i got the point.
can you suggest some? how about using some Linux utilities for creating the preview?
The only problem will be, some utilities will need OpenOffice to be there for generating the preview. But I haven't worked with them yet. Have to try. I wanted the best way to implement this.
User can upload any type of file. Its(file type) not restricted. Having separate rendering engines in this case will be a problem.
Thanks and regards,
Sandeep.
- 07-04-2009, 10:29 PM #4
There is a Java library for working with Office documents, but I don't think it does rendering. If you're lucky they'll have a thumbnail saved with them.
Don't forget to mark threads as [SOLVED] and give reps to helpful posts.
How To Ask Questions The Smart Way
Similar Threads
-
Creating layer on images ?
By Qmalq in forum AWT / SwingReplies: 2Last Post: 01-27-2009, 10:20 PM -
Creating a flat tool bar with images
By Java Tip in forum SWTReplies: 0Last Post: 07-02-2008, 08:10 PM -
Creating .Jar files
By Deathmonger in forum New To JavaReplies: 6Last Post: 06-22-2008, 11:59 PM -
Creating ZIP files
By Java Tip in forum Java TipReplies: 0Last Post: 03-03-2008, 05:14 PM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks