Hi Teng,

On Thu, Mar 28, 2013 at 01:52:35AM +0800, Teng Hailong <[email protected]> wrote:
>       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. 

That may be wrong, the various Writer/Calc/Impress pdf import really
just handles hybrid pdf (so later it can do an ODF import), nothing
else. Only Draw does pdf import.

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

If you only need to handle ODF documents, there is a thumbnail in these
documents, so providing preview for them is quite easy. For random
formats, I think you have to be more creative: e.g. convert to ODF
(that's always a good idea) and extract the thumbnail, or just convert
to PDF, and then convert to PDF to some image. It's up to you.

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

If you want to do document conversion from Tomcat, I would check how the
existing jodconverter-tomcat project does it, it should save you quite
some time, unless you like experimenting. :-)

HTH,

Miklos

Attachment: signature.asc
Description: Digital signature

_______________________________________________
LibreOffice mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/libreoffice

Reply via email to