Paul Chavent <paul.chavent <at> fnac.net> writes:
Thank Regina.
I will try on those other lists...
> Hi Paul,
>
> Paul Chavent schrieb:
>> With
>>
>> soffice.bin -env:UserInstallation=~/.libreoffice_cli/ --headles
>> --infilter="Thomas" --convert-to odt test.xml
>>
>> The application cannot be started.
>> [context="shared"] caught unexpected exception!
>
> It seems, that -env does not work from command line. I have tried it with a
Windows desktop link (WinXP), and
there it works.
>
> I think, that you do not need --headless because that is automatically done
in --convert-to.
>
> This is a very special question. So you might get a skilled help on the
developer mailinglist [1] or on
developer IRC [2].
> [1] libreoffice <at> lists.freedesktop.org
> [2] irc://chat.freenode.net/libreoffice-dev
>
> Kind regards
> Regina
>
>
Paul, I am running Debian on a desktop computer. I generally have LibreOffice
running with one or more documents open. I also use a number of scripts that
take advantage of a separate headless isntance of LibreOffice to convert files
to pdf and other formats.
What I did was to make a copy of the ~/.libreoffice directory, calling it
something line ~/.libreoffice-cli. The normal working instance of LibreOffice
will use the ~/.libreoffice environment. The script will use the
~/.libreoffice-cli environment with the following system call:
"soffice --headless -env:UserInstallation=file:///home/[USER]/.libreoffice-cli/
-convert-to pdf -outdir /tmp [FILENAME]"
I don't know if there is a better way, but this works flawlessly for me. I hope
it helps you.