I'm attempting to use the -convert-to command line option to convert files between formats without using LibreOffice's GUI. Here's an example command:
LibreOfficePortable.exe -headless -convert-to pdf untitled.odt
The command executes silently (returning no output of any sort), but doesn't appear to create an output file.
I've tried the command from both the Windows command line and from MSYS. I've also tried several other variants (such as calling soffice.exe directly) with the same result.
Has anyone had success with this operation?
Where did you get information about this?
neutron1132 (at) usa (dot) com
A Google search turned up a number of references, apparently from people who have used this option. It appears that most (all?) of them are using Linux. I'm attempting to use this option on Windows and am not sure that it is functional on this platform.
Before I asked you that question, I spent too much time trying find anything about the headless stuff. As you say, they were all Linux. In general, Linux seems to pride itself on strange command line stuff to prove how geeky it can be. Windows invests in GUIs and mice.
(And yeah, I've been around long enough to have used command lines going back to MS-DOS 2.11 and even several DOS alternatives back then like DR-DOS and 4DOS, so I'm not slamming command lines at all... just putting out an observation...)
neutron1132 (at) usa (dot) com
The command line options of soffice work fine on windows.
I've just written an electronic submission system for a college, and use this to convert student submissions to pdf.
The system runs unaltered on linux and windows. It converts lots of queued submissions and would not be viable if it needed someone to sit at a gui.
"Linux seems to pride itself on strange command line stuff to prove how geeky it can be"
The use of command line is not to be geeky, it is about choosing the correct tool for the job.
How could you run this as part of an unattended batch job otherwise?
just my two-pennorth
Aparently it should work on Windows too. Havent tried it though.
"What about Love?" - "Overrated. Biochemically no different than eating large quantities of chocolate." - Al Pacino in The Devils Advocate
Your exact command works perfectly here (WinXP_SP3 admin, commandline). It takes some time if run from an usb device, but having an eye on the processes, LibreOfficeWriterPortable.exe calls soffice.exe calls soffice.bin which is active during the task. A untitled.pdf is created at the end. Maybe it takes more time if the document is longer (mine contained just one word for testing).