Sign inSign up

hdejager/libreoffice-api

By hdejager

•Updated over 5 years ago

LibreOffice Headless with API in Docker

Image
3

10K+

hdejager/libreoffice-api repository overview

⁠LibreOffice Headless with API in Docker

Docker Pulls

A docker image that will run LibreOffice⁠ in headless mode, exposing its Universal Network Objects (UNO) API⁠ on port 8100.

I use this together with 2 brilliant Java libraries (jodconverter⁠ and jodreports⁠) that consume the API to convert documents and generate reports based on ODT⁠ templates.

For convenience I also include the Universal Office Converter (unoconv)⁠ tool in the image.

⁠Usage

⁠Run

docker run -d --name libreoffice -p 8100:8100 hdejager/libreoffice-api

⁠Try out unoconv (convert a HTML file to PDF):
docker cp test.html libreoffice:/tmp/test.html
docker exec -ti libreoffice \
unoconv \
  --connection 'socket,host=127.0.0.1,port=8100,tcpNoDelay=1;urp;StarOffice.ComponentContext' \
  -f pdf /tmp/test.html
docker cp libreoffice:/tmp/test.pdf .

Tag summary

Content type

Image

Digest

Size

425.1 MB

Last updated

over 5 years ago

docker pull hdejager/libreoffice-api