Jodconverter batch mode

64 views
Skip to first unread message

gizmotrader

unread,
Nov 5, 2008, 12:53:17 PM11/5/08
to JODConverter
Hi,

A customer I am working with has a requirement to transform various
document formats into PDF. I am going to use jodconverter to manage
this process. The conversion routine will need to handle ~ 5000
conversions each day, so will be running multiple threads.

I know OpenOffice server process can run out of memory / stop
responding fairly often. Does anyone have some code to allow the
OpenOffice process to be monitored and restarted if it stops
responding please?

Using jodconverter v2.2.1 and OpenOffice 3.

Regards,
Gary

Mirko Nasato

unread,
Nov 5, 2008, 1:24:00 PM11/5/08
to jodcon...@googlegroups.com
Hi Gary,

2008/11/5 gizmotrader <gizmo...@gmail.com>:


>
> A customer I am working with has a requirement to transform various
> document formats into PDF. I am going to use jodconverter to manage
> this process. The conversion routine will need to handle ~ 5000
> conversions each day, so will be running multiple threads.
>

5,000 per day means an average of 3.5 per minute, so it may not be a
lot. But it depends more on the peak traffic (or is it a batch
process?), and how big and complex the documents are.

> I know OpenOffice server process can run out of memory / stop
> responding fairly often. Does anyone have some code to allow the
> OpenOffice process to be monitored and restarted if it stops
> responding please?
>

Auto-restarting OOo if it crashes is one of the new features in
JODConverter 3.0. Although still not officially released, it's
available from the googlecode subversion repository.

http://code.google.com/p/jodconverter/source/checkout

Kind regards

Mirko

gizmotrader

unread,
Nov 5, 2008, 1:44:57 PM11/5/08
to JODConverter
Thank you for responding so quickly Mirko.

I will download the latest code and determine how to use the new
features. The documents being converted vary hugely in size. Key
requirement is to have a reliable server-side solution. If the auto-
restart stops me having to battle with OpenOffice flakiness,
fantastic.

Regards,
Gary

On Nov 5, 6:24 pm, "Mirko Nasato" <mirko.nas...@gmail.com> wrote:
> Hi Gary,
>
> 2008/11/5 gizmotrader <gizmotra...@gmail.com>:

gizmotrader

unread,
Nov 5, 2008, 2:46:26 PM11/5/08
to JODConverter
Hi Mirko,

I have downloaded V3. Can you give me a quick pointer as to how to use
it please as the code looks very different :)

Also does the software still allow byte streams to be converted as I
do not want to use files unless I have to?

Thanks,
Gary
> > Mirko- Hide quoted text -
>
> - Show quoted text -

Mirko Nasato

unread,
Nov 6, 2008, 7:46:00 AM11/6/08
to jodcon...@googlegroups.com
Hi Gary,

2008/11/5 gizmotrader <gizmo...@gmail.com>:
>


> I have downloaded V3. Can you give me a quick pointer as to how to use
> it please as the code looks very different :)
>

Yep unfortunately there's not much documentation at this stage.

Have a look at Convert.java, that should show the basic usage

http://code.google.com/p/jodconverter/source/browse/trunk/jodconverter/src/main/java/org/artofsolving/jodconverter/cli/Convert.java

> Also does the software still allow byte streams to be converted as I
> do not want to use files unless I have to?
>

Nope, and that's a deliberate choice.

In JODConverter 2.1 the default implementation
OpenOfficeDocumentConverter always use files anyway. Even the
convert(inputStream, inputFormat, outputStream, outputFormat) method
uses temporary files internally.

The alternate implementation StreamOpenOfficeDocumentConverter
actually uses OOo streams, but this approach has proved to be
troublesome and has thus been dropped in JODConverter 3.0. For one,
v2.1 will read the entire input file into memory before passing it to
OOo.

Kind regards

Mirko

Reply all
Reply to author
Forward
0 new messages