question about document converter of libreoffice 4.0.1
Teng Hailong
thlong at 21cn.com
Wed Mar 27 10:52:35 PDT 2013
Hi, all
I want to use libreoffice 4.0.1 (for Linux) to convert some kinds of
document(such as word,excel,pdf,ppt etc.) to HTML and I begin the work
from the java example code DocumentConverter.java in sdk.
I found my code will failed when it convert pdf to html if i didn't
assign input filter and output filter. After some test,i found i should
assign input filter 'impress_pdf_import' and output filter
'draw_html_Export', then the code will work.
It seems that each kind of document will need to assign different
filter in my code. So i need to spend lots of time to test these filter.
My question is ,how should i do to make my code act as the function of
preview in web browser in libreoffice GUI menu? I mean if i use
libreoffice to open these kinds of document directly, and then preview
it in web browser in GUI, the HTML document is exactly all my needed.
How could i call this function in GUI using java code?
My second question is, How should i call my java code in Tomcat? I
found my java code will work if i use "java -jar DocumentConverter ...".
But if i call it from Tomcat, it will raise the error "Bootstrapping
failure -OpenOffice not found". I had checked the forum in google.
Someone suggest me to download bootstrapconnector.jar to replace
Bootstrap.bootstrap() function. I tried it and found it could work.But
the performance is poor than bootstrap(),especially when the soffice
service is not started.
And i tried to copy juh.jar to libreoffice/program diretory and add it
to CLASSPATH, it didn't work.
So how should i do? Please give me help. Any suggestion will be very
appreciated.
Thanks.
Rgds,
Teng Hailong
More information about the LibreOffice
mailing list