I have tried running this command many times and all it does is exit and produce no output.
/usr/lib/libreoffice/program/soffice -headless -convert-to pdf myfile.ext
(where myfile.ext is the input file)
I have tried odt as the output target and also picked other input files. Nothing works. Here are some of the combinations of input and output options I have tried:
doc -> pdf
doc -> odt
txt -> pdf
odt -> pdf
odt -> doc
Mystery solved. For those of you baffled by this problem, here it is:
If soffice is already running (via the QuickStarter) or you already LibreOffice open working on another document, the --convert-to (in older version -convert-to) will fail. This is unfortunate because using the quickstarter greatly improves performance. I'm not sure why these are exclusive.
LibreOffice developers... can you fix this?
This is a problem in the 3.4.x branch as well.
[This is an automated message.]
This bug was filed before the changes to Bugzilla on 2011-10-16. Thus it
started right out as NEW without ever being explicitly confirmed. The bug is
changed to state NEEDINFO for this reason. To move this bug from NEEDINFO back
to NEW please check if the bug still persists with the 3.5.0 beta1 or beta2 prereleases.
Details on how to test the 3.5.0 beta1 can be found at:
more detail on this bulk operation: http://nabble.documentfoundation.org/RFC-Operation-Spamzilla-tp3607474p3607474.html
Dear bug submitter!
Due to the fact, that there are a lot of NEEDINFO bugs with no answer within the last six months, we close all of these bugs.
To keep this message short, more infos are available @ https://wiki.documentfoundation.org/QA/NeedinfoClosure#Statement
Thanks for understanding and hopefully updating your bug, so that everything is prepared for developers to fix your problem.
Okay, this is still definitely a problem. All I see are a bunch of system-generated responses and then this thing auto-closed as "RESOLVED INVALID". Has any human being apart from its submitter actually looked at this?
I can produce this issue so can give you any info you need to debug.
It looks like libreoffice tries to make things more efficient, since when you run 'soffice' while an instance is already running, it brings that window to the front. This is fine when using it on a GUI as a single-user, but a big reason to use LibreOffice is for running it on a server to convert, or quickly extract information from a wide variety of file formats. According to all the docs, I should be able to just nicely start soffice running like a service like so:
$ soffice --nofirststartwizard --minimized --invisible --accept="socket,port=8100;urp;"
Then from a separate process connect to it to quickly run small tasks, like conversion:
$ soffice --headless --convert-to pdf MyDocument.doc
Except: this just returns straight away, because soffice just sees that it's already running, and does nothing but try and make the 'main window' pop up. Obviously this is inapplicable in --invisible mode.
I know it's definitely connecting, since when I start it like a service, then in another window run:
$ soffice -nofirststartwizard
in the window running the service, I see:
Warning: -nofirststartwizard is deprecated. Use --nofirststartwizard instead.
Please please take a look at this. It would be a huge performance improvement, especially to those of us running libreoffice on backend servers. The file conversions libreoffice does are excellent and with a few small updates libreoffice could be for web applications managing office docs what imagemagick is to apps that manipulate images.
@joshua, thank you for following up on this. your comments express my senitments exactly.
Closing this as duplicated, btw if you have issues with startup time why not using something like unoconv instead?
*** This bug has been marked as a duplicate of bug 37531 ***