You are here

-convert-to command line option

7 posts / 0 new
Last post
drjones
Offline
Last seen: 12 years 11 months ago
Joined: 2011-04-26 12:33
-convert-to command line option

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?

J Neutron
Offline
Last seen: 2 weeks 5 days ago
Joined: 2008-06-10 19:26
Windows or Linux?

Where did you get information about this?

neutron1132 (at) usa (dot) com

drjones
Offline
Last seen: 12 years 11 months ago
Joined: 2011-04-26 12:33
Windows

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.

J Neutron
Offline
Last seen: 2 weeks 5 days ago
Joined: 2008-06-10 19:26
Apparently that's the answer

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

laccata
Offline
Last seen: 12 years 10 months ago
Joined: 2011-05-19 10:06
soffice command line stufee

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

Simeon
Simeon's picture
Offline
Last seen: 9 years 5 months ago
DeveloperTranslator
Joined: 2006-09-25 15:15
no

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

depp.jones
Offline
Last seen: 22 hours 24 min ago
DeveloperTranslator
Joined: 2010-06-05 17:19
Your exact command works

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).

Log in or register to post comments