question about document converter of libreoffice 4.0.1

Miklos Vajna vmiklos at suse.cz
Fri Mar 29 03:47:28 PDT 2013


Hi Teng,

On Thu, Mar 28, 2013 at 01:52:35AM +0800, Teng Hailong <thlong at 21cn.com> 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20130329/6b58ff19/attachment.pgp>


More information about the LibreOffice mailing list