Date: prev next · Thread: first prev next last
2013 Archives by date, by thread · List index


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  



Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.