Drag and Drop Office Docs

23 Aufrufe
Direkt zur ersten ungelesenen Nachricht

Bernard

ungelesen,
31.05.2011, 12:16:4831.05.11
an Open Wonderland Forum
All

I've been working on a proof-of-concept to drag and drop MS-Office
(and openoffice) documents into OWL, so that they appear as PDFs.
Although OWL is great for collaboration for those running the shared
app server, I think there's also a niche for shared viewing of MS-
Office documents without the overhead of the shared app server (and
also for non-Unix servers).

So, I produced a very short demo, at:
http://screencast.com/t/gPMYYN8Q

To complete the PoC, I think I need to understand how to set up a
runner to control the openoffice headless server and a web service
that acts as an interface to it. If you can help me with this, please
get in touch.

cheers

Bernard

Nussbaum-Jones, Nina

ungelesen,
31.05.2011, 12:31:1231.05.11
an openwon...@googlegroups.com
You've done it again.... Yay! :)

Nathan Labhart

ungelesen,
01.06.2011, 05:27:3801.06.11
an Open Wonderland Forum
Thank you, Bernard -- that's a very cool project!
Even though I can't contribute anything to the development, I'll be
happy to assist with testing, if needed.
Best,

Nathan

On May 31, 6:31 pm, "Nussbaum-Jones, Nina" <nina.nussbaum-

jagwire

ungelesen,
01.06.2011, 10:01:3001.06.11
an Open Wonderland Forum
Bernard,

If I can find the time, I'd be interested in helping where needed. In
terms of development, what all would be involved?

best,
jW

Bernard

ungelesen,
01.06.2011, 11:13:5801.06.11
an Open Wonderland Forum
jW

thanks for the offer!

first up... how do I deploy a third-party WAR file into the wonderland
web server? Do I need to wrap it up into a wonderland module?

Here's the library I'm using: http://www.artofsolving.com/opensource/jodconverter

cheers

Bernard

Jonathan Kaplan

ungelesen,
01.06.2011, 12:28:1101.06.11
an openwon...@googlegroups.com
Bernard,

To deploy a war file to the OWL web server, you put it in a module in the "web" part. Your build script will look something like this (assuming the war is in the module directory under "lib/my.war"):

<part name="web" dir="lib">
    <include name="my.war"/>
</part>

That should add my.war to the web section of the module, which you can see using "jar tvf module.jar".

As for creating the runner, this forum post has some details:

Bernard

ungelesen,
03.06.2011, 11:30:5603.06.11
an Open Wonderland Forum
Jon

ah, OK, thanks, the WAR gets deployed fine.

The conversion relies on running open office in server mode on the
webserver host, so I'm not sure I need a Runner class. What I _think_
I need is some way of running a shell script or command line, which on
the mac looks like:

/Applications/OpenOffice.org.app/Contents/MacOS/soffice -headless -
accept="socket,host=127.0.0.1,port=8100;urp;" -nofirststartwizard

and a way of checking if it's already running. (Plus the ability to
distinguish what OS the webserver is running on, so as to use the
correct script.) Any ideas from our Windows/Linux users?

(There's also the slight problem of PDF drag and drop not working,
which means I can't D&D office docs reliably. See
http://groups.google.com/group/openwonderland/browse_thread/thread/db7fdacd50fd7ef4)

cheers

Bernard

Jordan

ungelesen,
03.06.2011, 20:03:1603.06.11
an Open Wonderland Forum
Bernard,

Perhaps you can use this to run an external command from within Java?
I've had success using it myself:

http://download.oracle.com/javase/6/docs/api/java/lang/ProcessBuilder.html

If that's what you mean. Don't know what you mean by checking whether
it is running, besides grepping through a ps, or something like that
in some platform-independent way.

Jordan

Jonathan Kaplan

ungelesen,
08.06.2011, 11:38:3308.06.11
an openwon...@googlegroups.com
Bernard,

I would still recommend using a runner for the OpenOffice stuff. The main task is to create a zip file with the contents you need (it may just be a shell script if you assume oo.o is already installed). The zip file should also have a run.xml file that, when run with "ant -f run.xml" starts your service. In ant, that would be a simple matter of calling:

<exec executable="run-ooo.sh"/>

Of course as you support more platforms, you could check the os.name and run a batch file or a different script for different operating systems.

Once you have the zip file, creating the runner should only require a few lines of code that you can copy from the red5 runner.  By creating a runner, you will be able to start and stop the service from the web UI and see its output in the log.

Bernard

ungelesen,
10.06.2011, 08:10:5610.06.11
an Open Wonderland Forum
Jon

thanks for the advice... though I had already taken a different tack:
to create my own Runner using a ProcessBuilder, as I didn't want to
have to deploy any files.

It's almost working, but I've not been able to give much time to it.
If anyone's interested in taking a look, the source is in the unstable
directory of the wonderland-modules repository.

regards

Bernard


On Jun 8, 4:38 pm, Jonathan Kaplan <jonathan...@gmail.com> wrote:
> Bernard,
>
> >http://groups.google.com/group/openwonderland/browse_thread/thread/db...
> > )

Bernard

ungelesen,
13.06.2011, 09:42:3613.06.11
an Open Wonderland Forum
Jon

not sure why, but my approach wouldn't work with processbuilder (and
wouldn't work with processbuilder outside of OWL either), so I took
your advice. I've committed the code and it appears to work on the
Mac. I haven't figured out how to get it to work on windows, although
I used to teach DOS in the mid-80's I've managed to avoid it ever
since.

If someone can figure out how to get this to work on unix and windows,
I'll be glad to release it as a module.

cheers

Bernard

Bernard

ungelesen,
28.06.2011, 07:07:4128.06.11
an Open Wonderland Forum
TESTERS REQUIRED!

I've updated the office-converter module so that (as far as I can
tell) it works on Windows7, Ubuntu and Mac OS X. However, before
adding this to the module warehouse, I'd appreciate some testing, esp.
wrt deployment/installation instructions.

There's a constraint on the size (in terms of bytes) of document that
can be converted, and also there's an issue of URL-unfriendly chars in
the filename. However, it works for me--you should be able to DnD any
pretty much any format that OpenOffice recognises.

cheers

Bernard

On Jun 13, 2:42 pm, Bernard <bern...@essex.ac.uk> wrote:
> Jon
>
> not sure why, but my approach wouldn't work with processbuilder (and
> wouldn't work with processbuilder outside of OWL either), so I took
> your advice. I've committed the code and it appears to work on the
> Mac. I haven't figured out how to get it to work on windows, although
> I used to teach DOS in the mid-80's I've managed to avoid it ever
> since.
>
> If someone can figure out how to get this to work on unix and windows,
> I'll be glad to release it as a module.
>
> cheers
>
> Bernard
>
> On Jun 10, 1:10 pm,Bernard<bern...@essex.ac.uk> wrote:
>
>
>
> > Jon
>
> > thanks for the advice... though I had already taken a different tack:
> > to create my own Runner using a ProcessBuilder, as I didn't want to
> > have to deploy any files.
>
> > It's almost working, but I've not been able to give much time to it.
> > If anyone's interested in taking a look, the source is in the unstable
> > directory of the wonderland-modules repository.
>
> > regards
>
> >Bernard
>
> > On Jun 8, 4:38 pm, Jonathan Kaplan <jonathan...@gmail.com> wrote:
>
> > >Bernard,
>
> > > I would still recommend using a runner for the OpenOffice stuff. The main
> > > task is to create a zip file with the contents you need (it may just be a
> > > shell script if you assume oo.o is already installed). The zip file should
> > > also have a run.xml file that, when run with "ant -f run.xml" starts your
> > > service. In ant, that would be a simple matter of calling:
>
> > > <exec executable="run-ooo.sh"/>
>
> > > Of course as you support more platforms, you could check the os.name and run
> > > a batch file or a different script for different operating systems.
>
> > > Once you have the zip file, creating the runner should only require a few
> > > lines of code that you can copy from the red5 runner.  By creating a runner,
> > > you will be able to start and stop the service from the web UI and see its
> > > output in the log.
>
> > > > > On Wed, Jun 1, 2011 at 8:13 AM,Bernard<bern...@essex.ac.uk> wrote:
> > > > > > jW
>
> > > > > > thanks for the offer!
>
> > > > > > first up... how do I deploy a third-party WAR file into the wonderland
> > > > > > web server? Do I need to wrap it up into a wonderland module?
>
> > > > > > Here's the library I'm using:
> > > > > >http://www.artofsolving.com/opensource/jodconverter
>
> > > > > > cheers
>
> > > > > >Bernard
>
> > > > > > On Jun 1, 3:01 pm, jagwire <rnb...@mizzou.edu> wrote:
> > > > > > >Bernard,
>
> > > > > > > If I can find the time, I'd be interested in helping where needed. In
> > > > > > > terms of development, what all would be involved?
>
> > > > > > > best,
> > > > > > > jW
>
> > > > > > > On Jun 1, 4:27 am, Nathan Labhart <nathan.labh...@gmail.com> wrote:
>
> > > > > > > > Thank you,Bernard-- that's a very cool project!

Nathan Labhart

ungelesen,
28.06.2011, 08:25:5128.06.11
an Open Wonderland Forum
Hi Bernard

I'm running OWL on Ubuntu 10.10 and Mac OS X 10.6.x, and am ready for
testing.
Best,


Nathan

Nussbaum-Jones, Nina

ungelesen,
28.06.2011, 08:33:0628.06.11
an openwon...@googlegroups.com
I installed it easily on Solaris 10. I dnd'ed a pptx file and got this:

Jun 28, 2011 8:30:57 AM org.jdesktop.wonderland.client.input.InputManager drop
WARNING: Drop: 1 items
Jun 28, 2011 8:30:57 AM org.jdesktop.wonderland.client.jme.dnd.DragAndDropManager$GlobalDropListener drop
WARNING: In global listener: 1
Jun 28, 2011 8:30:57 AM org.jdesktop.wonderland.modules.officeconverter.client.OfficeContentImporter convertFile
WARNING: URI: http://ms2vc2:8080//office-converter/converter/service
Jun 28, 2011 8:30:57 AM org.jdesktop.wonderland.modules.officeconverter.client.OfficeContentImporter convertFile
WARNING: Extension: pptx
Jun 28, 2011 8:30:57 AM org.jdesktop.wonderland.modules.officeconverter.client.OfficeContentImporter convertFile
WARNING: Format: application/vnd.openxmlformats-officedocument.presentationml.presentation
network: Connecting socket://ms2vc2:8080 with proxy=DIRECT
Jun 28, 2011 8:31:08 AM org.jdesktop.wonderland.modules.officeconverter.client.OfficeContentImporter convertFile
WARNING: Output filename: UI-feedback.pptx.pdf
Jun 28, 2011 8:31:08 AM org.jdesktop.wonderland.modules.officeconverter.client.OfficeContentImporter convertFile
SEVERE: failed to convert file
java.io.FileNotFoundException: UI-feedback.pptx.pdf (Access is denied)
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.<init>(Unknown Source)
at java.io.FileOutputStream.<init>(Unknown Source)
at org.jdesktop.wonderland.modules.officeconverter.client.OfficeContentImporter.convertFile(OfficeContentImporter.java:189)
at org.jdesktop.wonderland.modules.officeconverter.client.OfficeContentImporter.uploadContent(OfficeContentImporter.java:145)
at org.jdesktop.wonderland.client.jme.content.AbstractContentImporter.importFile(AbstractContentImporter.java:147)
at org.jdesktop.wonderland.client.jme.dnd.FileListDataFlavorHandler$1.run(FileListDataFlavorHandler.java:165)
Converted file: null
Jun 28, 2011 8:31:08 AM org.jdesktop.wonderland.client.jme.dnd.FileListDataFlavorHandler$1 run
WARNING: Error importing C:\Users\nnjones\Documents\ICEStorm\UI-feedback.pptx
java.lang.NullPointerException
at org.jdesktop.wonderland.client.jme.content.AbstractContentImporter.getFileExtension(AbstractContentImporter.java:278)
at org.jdesktop.wonderland.client.jme.content.AbstractContentImporter.createCell(AbstractContentImporter.java:213)
at org.jdesktop.wonderland.client.jme.content.AbstractContentImporter.importFile(AbstractContentImporter.java:179)
at org.jdesktop.wonderland.client.jme.dnd.FileListDataFlavorHandler$1.run(FileListDataFlavorHandler.java:165)

Michel DENIS

ungelesen,
28.06.2011, 08:43:4028.06.11
an openwon...@googlegroups.com
Hello Bernard,

In local mode (Ubuntu 9.04 and latest trunk) it works fine for what I inserted:
.ODP, .ODT, .ODS, PPT, .XLS and .DOC
All become usable inworld as PDF.

Congratulations !
-michel
BTW: what are the latest trends about voice/sound for webcast module ??

Bernard a écrit :
-- 
Michel DENIS
Président, Internet 3 Solutions SAS
Tél: 06.72.87.17.50
michel...@internet3solutions.com
http://www.internet3solutions.com/

Bernard

ungelesen,
29.06.2011, 04:12:4429.06.11
an Open Wonderland Forum
Nathan

ah, great. I forgot to mention... the source is in the directory
office-converter in the unstable directory of wonderland-modules. Go
ahead and deploy the module AFTER reading the installation
instructions.

thanks

Bernard

Bernard

ungelesen,
29.06.2011, 04:14:4129.06.11
an Open Wonderland Forum
Nina

hmm, I haven't tried this on Solaris. However, this looks odd. While I
install a copy of Solaris, could you try the following:

1) Open a web browser to http://ms2vc2:8080//office-converter/converter/
2) Using the web interface on that page, try to convert your document
3) Let me know how you get on

thanks

Bernard


On Jun 28, 1:33 pm, "Nussbaum-Jones, Nina" <nina.nussbaum-
jo...@lmco.com> wrote:
> I installed it easily on Solaris 10.  I dnd'ed a pptx file and got this:
>
> Jun 28, 2011 8:30:57 AM org.jdesktop.wonderland.client.input.InputManager drop
> WARNING: Drop: 1 items
> Jun 28, 2011 8:30:57 AM org.jdesktop.wonderland.client.jme.dnd.DragAndDropManager$GlobalDropListene r drop
> WARNING: In global listener: 1
> Jun 28, 2011 8:30:57 AM org.jdesktop.wonderland.modules.officeconverter.client.OfficeContentImporte r convertFile
> Jun 28, 2011 8:30:57 AM org.jdesktop.wonderland.modules.officeconverter.client.OfficeContentImporte r convertFile
> WARNING: Extension: pptx
> Jun 28, 2011 8:30:57 AM org.jdesktop.wonderland.modules.officeconverter.client.OfficeContentImporte r convertFile
> WARNING: Format: application/vnd.openxmlformats-officedocument.presentationml.presentation
> network: Connecting socket://ms2vc2:8080 with proxy=DIRECT
> Jun 28, 2011 8:31:08 AM org.jdesktop.wonderland.modules.officeconverter.client.OfficeContentImporte r convertFile
> WARNING: Output filename: UI-feedback.pptx.pdf
> Jun 28, 2011 8:31:08 AM org.jdesktop.wonderland.modules.officeconverter.client.OfficeContentImporte r convertFile
> SEVERE: failed to convert file
> java.io.FileNotFoundException: UI-feedback.pptx.pdf (Access is denied)
>         at java.io.FileOutputStream.open(Native Method)
>         at java.io.FileOutputStream.<init>(Unknown Source)
>         at java.io.FileOutputStream.<init>(Unknown Source)
>         at org.jdesktop.wonderland.modules.officeconverter.client.OfficeContentImporte r.convertFile(OfficeContentImporter.java:189)
>         at org.jdesktop.wonderland.modules.officeconverter.client.OfficeContentImporte r.uploadContent(OfficeContentImporter.java:145)
>         at org.jdesktop.wonderland.client.jme.content.AbstractContentImporter.importFi le(AbstractContentImporter.java:147)
>         at org.jdesktop.wonderland.client.jme.dnd.FileListDataFlavorHandler$1.run(File ListDataFlavorHandler.java:165)
> Converted file: null
> Jun 28, 2011 8:31:08 AM org.jdesktop.wonderland.client.jme.dnd.FileListDataFlavorHandler$1 run
> WARNING: Error importing C:\Users\nnjones\Documents\ICEStorm\UI-feedback.pptx
> java.lang.NullPointerException
>         at org.jdesktop.wonderland.client.jme.content.AbstractContentImporter.getFileE xtension(AbstractContentImporter.java:278)
>         at org.jdesktop.wonderland.client.jme.content.AbstractContentImporter.createCe ll(AbstractContentImporter.java:213)
>         at org.jdesktop.wonderland.client.jme.content.AbstractContentImporter.importFi le(AbstractContentImporter.java:179)
>         at org.jdesktop.wonderland.client.jme.dnd.FileListDataFlavorHandler$1.run(File ListDataFlavorHandler.java:165)
> ...
>
> read more »

Bernard

ungelesen,
29.06.2011, 04:16:0829.06.11
an Open Wonderland Forum
Michel

glad to hear this worked for you. Is there anything I could do to
improve the instructions?

wrt the webcast, we're making slow progress with the audio. The
student who is working on it has been taking exams and then vacation,
so we hope to make more porgress in the next couple of weeks.

cheers

Bernard

On Jun 28, 1:43 pm, Michel DENIS <michel.m.de...@gmail.com> wrote:
> Hello Bernard,
>
> In local mode (Ubuntu 9.04 and latest trunk) it works fine for what I
> inserted:
> .ODP, .ODT, .ODS, PPT, .XLS and .DOC
> All become usable inworld as PDF.
>
> Congratulations !
> -michel
> BTW: what are the latest trends about voice/sound for webcast module ??
>
> Bernard a �crit :
> Pr�sident, Internet 3 Solutions SAS
> T�l: 06.72.87.17.50
> michel.de...@internet3solutions.comhttp://www.internet3solutions.com/

Michel DENIS

ungelesen,
29.06.2011, 04:23:0429.06.11
an openwon...@googlegroups.com
Looks OK Bernard !

-michel

Bernard a écrit :

Nussbaum-Jones, Nina

ungelesen,
29.06.2011, 08:05:0329.06.11
an openwon...@googlegroups.com
Nice test page! Opened perfectly in my acrobat reader. (Pretty sneaky, too!) :)

-----Original Message-----
From: openwon...@googlegroups.com [mailto:openwon...@googlegroups.com] On Behalf Of Bernard
Sent: Wednesday, June 29, 2011 4:15 AM
To: Open Wonderland Forum

Subject: EXTERNAL: Re: Drag and Drop Office Docs

Nina

hmm, I haven't tried this on Solaris. However, this looks odd. While I install a copy of Solaris, could you try the following:

1) Open a web browser to http://ms2vc2:8080//office-converter/converter/
2) Using the web interface on that page, try to convert your document
3) Let me know how you get on

thanks

Bernard

> -----Original Message-----
> From: openwon...@googlegroups.com
> [mailto:openwon...@googlegroups.com] On Behalf Of Nathan Labhart
> Sent: Tuesday, June 28, 2011 8:26 AM

> To: Open Wonderland Forum
> Subject: EXTERNAL: Re: Drag and Drop Office Docs
>
> Hi Bernard
>
> I'm running OWL on Ubuntu 10.10 and Mac OS X 10.6.x, and am ready for testing.
> Best,
>
> Nathan
>
> On Jun 28, 1:07 pm, Bernard <bern...@essex.ac.uk> wrote:

> ...
>
> read more »

Bernard

ungelesen,
30.06.2011, 04:30:4130.06.11
an Open Wonderland Forum
Nina

OK, so I have solaris10 running on vbox, but I can't get OWL to run...
is there some special incantation? (I'm getting a derby class cast
exception)

Also, could you tell me what client platform you're using.... and
finally, if there's anything odd about your client that might give
rise to an 'Access Denied' exception?

thanks

Bernard

On Jun 29, 1:05 pm, "Nussbaum-Jones, Nina" <nina.nussbaum-
jo...@lmco.com> wrote:
> Nice test page!  Opened perfectly in my acrobat reader.  (Pretty sneaky, too!) :)
>
>
>
> -----Original Message-----
> From: openwon...@googlegroups.com [mailto:openwon...@googlegroups.com] On Behalf Of Bernard
> Sent: Wednesday, June 29, 2011 4:15 AM
> To: Open Wonderland Forum
> Subject: EXTERNAL: Re: Drag and Drop Office Docs
>
> Nina
>
> hmm, I haven't tried this on Solaris. However, this looks odd. While I install a copy of Solaris, could you try the following:
>
> 1) Open a web browser tohttp://ms2vc2:8080//office-converter/converter/
> ...
>
> read more »

Nathan Labhart

ungelesen,
30.06.2011, 10:11:1930.06.11
an Open Wonderland Forum
Hi Bernard

happy to report NO PROBLEMS (apart from some missing fonts, as could
be expected) with the various DOC, DOCX, TXT, PPT, ODT and ODT and ODS
files I threw at it. Excellent work!

Mac OS X 10.7 (Developer Preview), Java 1.6.0_26
Mac OS X 10.6.7, Java 1.6.0_26 (using LibreOffice, I changed the
application name in startMacOO.sh)
Ubuntu 10.10, Java 1.6.0_24

Best,


Nathan

Nussbaum-Jones, Nina

ungelesen,
30.06.2011, 14:27:5230.06.11
an openwon...@googlegroups.com
I'm sure you've got the right jdk installed, and it's in your path variable. But other than that, I'm not sure about why you're getting that error. My client is Windows 7 SP 1. It doesn't look like the documents made it to the server. In fact, the name of the document that shows up in my acrobat reader is a temp file with no extension. If it will help, then I will try to print out more stepwise info from the client-side of the code if I get a minute this evening.

Thanks!
-Nina-

-----Original Message-----
From: openwon...@googlegroups.com [mailto:openwon...@googlegroups.com] On Behalf Of Bernard
Sent: Thursday, June 30, 2011 4:31 AM
To: Open Wonderland Forum

Subject: EXTERNAL: Re: Drag and Drop Office Docs

Nina

OK, so I have solaris10 running on vbox, but I can't get OWL to run...
is there some special incantation? (I'm getting a derby class cast
exception)

Also, could you tell me what client platform you're using.... and finally, if there's anything odd about your client that might give rise to an 'Access Denied' exception?

thanks

Bernard

On Jun 29, 1:05 pm, "Nussbaum-Jones, Nina" <nina.nussbaum- jo...@lmco.com> wrote:
> Nice test page!  Opened perfectly in my acrobat reader.  (Pretty

> sneaky, too!) :)


>
>
>
> -----Original Message-----
> From: openwon...@googlegroups.com
> [mailto:openwon...@googlegroups.com] On Behalf Of Bernard
> Sent: Wednesday, June 29, 2011 4:15 AM

> To: Open Wonderland Forum
> Subject: EXTERNAL: Re: Drag and Drop Office Docs
>
> Nina
>
> hmm, I haven't tried this on Solaris. However, this looks odd. While I install a copy of Solaris, could you try the following:
>
> 1) Open a web browser
> tohttp://ms2vc2:8080//office-converter/converter/
> 2) Using the web interface on that page, try to convert your document
> 3) Let me know how you get on
>

> thanks
>
> Bernard

> > -----Original Message-----
> > From: openwon...@googlegroups.com
> > [mailto:openwon...@googlegroups.com] On Behalf Of Nathan Labhart
> > Sent: Tuesday, June 28, 2011 8:26 AM

> ...
>
> read more »

Bernard

ungelesen,
30.06.2011, 18:00:4730.06.11
an Open Wonderland Forum
Nina

My interpretation of the exception is that the converter failed to
create the file on the client when reading it from the server. Though
I could easily be wrong.

Bernard

On Jun 30, 7:27 pm, "Nussbaum-Jones, Nina" <nina.nussbaum-
> ...
>
> read more »

Bernard

ungelesen,
01.07.2011, 07:15:1201.07.11
an Open Wonderland Forum
Nina

FYI: I just tried using a Windows7 client with a Mac OS X server and
it appeared to work fine.

regards

Bernard

On Jun 30, 7:27 pm, "Nussbaum-Jones, Nina" <nina.nussbaum-
> ...
>
> read more »

Nussbaum-Jones, Nina

ungelesen,
01.07.2011, 08:11:2001.07.11
an openwon...@googlegroups.com
I will do some testing (I promise!!) and get back to you. Thanks for double checking.

Nathan Labhart

ungelesen,
02.07.2011, 03:58:3002.07.11
an Open Wonderland Forum
D'oh... forgot to mention that the three environments were all tested
both as client and as server.
Allen antworten
Antwort an Autor
Weiterleiten
0 neue Nachrichten