Date: prev next · Thread: first prev next last
2012 Archives by date, by thread · List index

This is my first post to this mailing list, so I'd beg your indulgence if I'm
breaking any rules of list etiquette here.

When you invoke LibreOffice from the command line with the headless command
and try to convert a file to another format, the exit code of the command is
zero regardless of whether LibreOffice was actually able convert the file or
not. I wanted to get clarification on whether this was intentional or not. I
could see why this might make sense (LibreOffice didn't do what you wanted
to but it did open and close successfully) - but, not knowing enough about
the program I wasn't sure if this was an error or intended behavior.

I discovered this while invoking LibreOffice from within Python using
subprocess.check_call() but I've also tested it at the command line to be

The behavior I am talking about can be recreated as follows:
If you are on the command line, working in a directory with a file named

Successfully running the command:
$ libreoffice --headless --convert-to fodt test.docx
$ echo "$?"

Unsuccessfully running the command:
$ libreoffice --headless -- convert-to fodt not_an_actual_file.docx
$ echo "$?"

Thanks in advance for any input.

View this message in context:
Sent from the Discuss mailing list archive at

Unsubscribe instructions: E-mail to
Posting guidelines + more:
List archive:
All messages sent to this list will be publicly archived and cannot be deleted


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.