6 replies [Last post]
gdb@schaubroeck.be
Offline
Joined: 2010-10-05

For some reason I need open office as service on my server. Currently i'm using open office with docmosis in my webapplication.

Docmosis starts open office with some specific startup parameters, one of them is the "-accept" parameter, as follow: "-accept=pipe,name=pipe_6973752705093844935;urp;"
Is it possible to change (or remove) this parameter in "-accept="socket,host=127.0.0.1,port=8100;urp;"" ?

I know it is possible to add some startup parameters in the docmosis.properties file, but these parameters are only added.
When I add docmosis.converter.launch.args=-accept="socket,host=127.0.0.1,port=8100;urp;" to the properties file, I have two -accept parameters, but I can't reach open office as service.

So my question is, is it possible to startup open office as service and using it for docmosis?

Thanks for any help!
I really appreciate your time and help.

admin
Offline
Joined: 2010-09-06
Using A Service

Docmosis has "converters" which are suitable to be run as a service. These converters will start and manage OpenOffice on your behalf, which is important to avoid some of the memory leaks and crashes OpenOffice can occasionally do.

Is there a reason you wouldn't run a Docmosis converter as a service, rather than OpenOffice itself? The only reason I can think that you would want to run OpenOffice directly is if you want to connect to it with something else as well as Docmosis which is probably a bad idea. Can you explain a little more about the reasons?

gdb@schaubroeck.be
Offline
Joined: 2010-10-05
convert to PDF

My main goal is to create a thumbnail image from a doc(x) or xls(x) file.
So in first place I should make a PDF from the document with JODConverter, but JODConverter needs open office as service. (when I have a PDF, i can convert it to a thumbnail)
So for this reason I should try to start open office as service.

Unless there is another way with docmosis to create a thumbnail or PDF from a doc(x) or xls(x) file?

admin
Offline
Joined: 2010-09-06
Thumbnailing
Hello gdb. Why are you asking Docmosis forums about running OpenOffice as a service for JODConverter? Anyway... Docmosis will produce a thumbnail for you (thanks to OpenOffice) - (see the JavaDoc for TemplateDetails in the support page) using code like this:
  1.   TemplateIdentifier myTemplateId = new TemplateIdentifier("my template.doc");
  2.   File thumbnail = TemplateStoreFactory.getStore().getTemplate(myTemplateId).getDetails().getThumbnail();
That thumbnail is likely to be the same as produced by JODConverter since it is also based on JODConverter. Currently Docmosis only expects to work with documents so you may or may not have much luck getting it to read your xls(x) files. If you rename them to .doc files, I'm pretty sure Docmosis and OpenOffice will forgive you and give you the thumbnail. Does that help?
gdb@schaubroeck.be
Offline
Joined: 2010-10-05
Hello Paulj, I don't asking

Hello Paulj,

I don't asking about JODConverter, i explained you the reason for my question, like you asked ...

I'm not able to produce a valid thumbail with the "getDetails().getThumbnail();".
I also used this in a webapplication, so I can't force my clients tu rename their xls(x) files to doc(x) files before they upload them, so I need something for both files.

Back to my main question, is it possible to run open office as service for docmosis, can I change the "-accept" parameter at the startup of open office by docmosis?
Or is it possible to create a PDF file from xls(x) and doc(x) files with docmosis so i don't need the JODConverter?

Thanks for your help so far.

admin
Offline
Joined: 2010-09-06
Sounds like you simply need two tools

Hello gdb.

It sounds like you need two different tools:

1) JODConverter + OpenOffice as a service for thumbnailing doc(x) and xls(x).
2) Docmosis for reporting (if you need Docmosis at all)

If your requirement is only to produce the thumbnails, then Docmosis is not the tool you need. No, you can not currently configure Docmosis to talk to an OpenOffice process on a socket and Docmosis does not process xls(x) files currently. Docmosis has been carefully tested for stability and performance under heavy load which is why it manages OpenOffice on your behalf.

gdb@schaubroeck.be
Offline
Joined: 2010-10-05
2 running office processes

Ok Paul,

I'm also thinking I need the two tools.

The only thing is, I need two soffice processes when i need both tools.
That's something i'm not very happy with and something what I want to avoid if possible.

But thanks for the confirmation I can't change the startup parameters.

Thanks for your help Paul.