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
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
> 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