Skip to content

otters-team/docker-libreoffice-api

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

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 .

About

Headless LibreOffice in Docker listening for API requests.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published