Using LibreOffice to convert documents is easy, you can use a command like this to convert a file to PDF, for example:
$ libreoffice --headless --convert-to pdf ~/Documents/MyDocument.odf
However, that will load LibreOffice into memory, convert a file and then exit LibreOffice, which means that the next time you convert a document LibreOffice needs to be loaded into memory again.
To avoid that, LibreOffice has a listener mode, where it can listen for commands via a port, and load and convert documents without exiting and reloading the software. This lowers the CPU load when converting many documents with somewhere between 50% and 75%, meaning you can convert somewhere between two and four times as many documents in the same time using a listener.
Unoserver contains three commands to help you do this, unoserver which starts a listener on the specified IP interface and port, and unoconverter which will connect to a listener and ask it to convert a document, as well as unocompare which will connect to a listener and ask it to compare two documents and convert the result document.
Homepage
Download
Recent Releases
3.711 Jun 2026 03:15
minor bugfix:
Added a --temp-dir parameter to specify a non-default temporary directory.
Improved logging in `unocompare`.
Added the LibreOffice version to the info endpoint, and printed it in `unoping`.
a in unoservers handling of the `-f` parameter.
Better error message if the outpath is not writeable.
3.624 Jan 2026 03:15
minor bugfix:
A (and a cleanup) in unocompare after code review.
Added a unoping command to check if the server is up and running.
Added deprecation warnings to deprecated command line options.
3.427 Sep 2025 03:15
minor feature:
Added --logfile, -f parameters to all scripts, to write logs to a.
File instead of to stderr.
3.3.210 Jul 2025 03:15
minor bugfix:
Another memory leak.
3.3.107 Jul 2025 03:15
minor bugfix:
Now uses a temporary file for the input as well, as it's not obvious to me.
How to use `private:stream` without memory leaks.
3.303 Jul 2025 03:15
minor feature:
Added support to use https between client and server.
Defaults to http. Prpl, Regebro .
The server now uses a temporary file to write the outfile to, as some
filters raise an error when using `private:stream`. ().
3.201 Apr 2025 16:07
minor feature:
Added a `--stop-after` parameter, that makes unoserver quit after a certain number of requests. This is useful if you want to minimize memory usage, as memory usage after a large file is not reclaimed automatically. Witiko . 3.2b2 (2025-03-28). Added --verbose and --quiet parameters to unoserver. 3.2b1 (2025-03-28). Better handling of fast and slow LibreOffice startup times. Faster on fast PC's more stable on slow PC's.
|