OoO  En  ce début  de  soirée  du jeudi  24  juillet  2008, vers  21:21,
[EMAIL PROTECTED] disait :

> $ unoconv -v -f odt curriculum-vitae-dag-wieers.doc
> Input file: curriculum-vitae-dag-wieers.doc
> file:///home/philippe/tmp/curriculum-vitae-dag-wieers.doc
> unoconv: UnoException during conversion: URL seems to be an unsupported one.
> The provided document cannot be converted to the desired format.
> Traceback (most recent call last):
>   File "/usr/bin/unoconv", line 567, in <module>
>     main()
>   File "/usr/bin/unoconv", line 546, in main
>     convertor.convert(inputfn)
>   File "/usr/bin/unoconv", line 451, in convert
>     doc = self.desktop.loadComponentFromURL( inputurl , "_blank", 0, 
> inputprops
> )
> __main__.IllegalArgumentException: URL seems to be an unsupported one.

Hi Philippe!

Sorry for the late answer.

Could you try the following script:

#!/usr/bin/env python

FILE='file:///home/philippe/data/cv/philippe_bourcier.rtf'

import uno
From com.sun.star.beans import PropertyValue
localContext = uno.getComponentContext()
resolver = localContext.ServiceManager.createInstanceWithContext(
    "com.sun.star.bridge.UnoUrlResolver", localContext)
ctx = resolver.resolve( "uno:socket,host=localhost,port=2002;urp;StarOffice.ComponentContext" )
smgr = ctx.ServiceManager
desktop = smgr.createInstanceWithContext( "com.sun.star.frame.Desktop",ctx)
inputprops = ( PropertyValue( "Hidden" , 0 , True, 0 ), )
doc = desktop.loadComponentFromURL( FILE , "_blank", 0, inputprops )
You need to start OpenOffice with the following command before:
 soffice "-accept=socket,host=localhost,port=2002;urp;"

Tell me if you get the same error.

Thanks.
-- 
panic("Attempted to kill the idle task!");
        2.2.16 /usr/src/linux/kernel/exit.c

Attachment: pgpAYHU5UKxUA.pgp
Description: PGP signature

Reply via email to