views:

46

answers:

3

Hello, I am searching on ways to make a small app using GWT for converting documents from one format to other. Mainly these formats .doc , .pdf , .odt , .rtf.. and maybe a couple more. Has anyone tried this before?? I came across the library JODConverter but it needs open office to be already installed and i don't really know how many people have used it with gwt in past. Please give me some starting pointers, or if anyone has experience with this kind of app, do share. Thanks and regards, Rohit

+1  A: 

I was looking into implementing something like this a few month ago.
Since GWT compiles your code to JavaScript there is no way for you to do that on the client side, JavaScript can't access the file system.
So you would need to upload the file to the server first and do the conversion on the server side and send the converted file back.
I have never heard of JODConverter before, the the library I wanted to use was Apache POI . Unfortunately I can't tell you anything about it, because I haven't tried it yet.

Chris Boesing
A: 

GWT is mostly a client side toolkit. Are you trying to make a tool that does all the conversion on the client side, with no help from the server? In that case, you should be looking for JavaScript libraries that can read/convert all those formats. If you are planning to have the user upload their files to the server, then you can use whatever technology you want on the server, and just use GWT for the UI.

Peter Recore
Yes I am looking for the latter option actually.. I'll upload the file on the server,, So any pointers how should i go about it..?? i need basically java api I suppose..
wanderer
+1  A: 

It sounds like JOD Converter is precisely what you need since you're looking at multi format conversions from Java. You would install OpenOffice on your server and link it up with JOD Converter. When a document is uploaded, your application would call JOD Converter to perform the conversion and stream the converted document back to the caller. Alternatively you can put the file somewhere, and send a link (URL) back to the caller so they can fetch the document. You can also look at JOD Reports or Docmosis if you need to manipulate the documents.

jowierun