https://bugs.documentfoundation.org/show_bug.cgi?id=152192

--- Comment #5 from tovrstra <[email protected]> ---
I also wondered why it was only possible to specify the output directory. I
agree, it makes sense when converting many files in one call. When converting a
single file, this argument doesn't apply.

I'm using the following workaround (sh command on Linux):

WORK=`mktemp -d --suffix=convert` && libreoffice
-env:UserInstallation=file://${WORK} --convert-to pdf ${inp} --outdir ${WORK} >
/dev/null && cp ${WORK}/*.pdf ${out} && rm -r ${WORK}

${inp} is the input path.
${out} is the output path.

The -env:UserInstallation=file://${WORK} part makes this one-liner work
correctly in parallel workflows. Without it, libreoffice will just exit
silently if another conversion is already running: See
https://bugs.documentfoundation.org/show_bug.cgi?id=106134

I'm not sure if there are better solutions than my somewhat clumsy one-liner?
It seems less than ideal that something as simple as converting file A to
another file B requires such a workaround. Simple things should be simple.

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to