A docker container environment to bundle the execution of LibreOffice to convert documents of various types (such as Word, OpenDocument, etc.) to PDF. An instance of LibreOffice will be run in the background, and controlled via a local socket (i.e. the UNO protocol).
This service is intended for use exclusively as a docker container. While it may be possible to run this application stand-alone, this is not recommended. For normal usage, you should pull the latest stable image off DockerHub and run it like this:
docker pull alephdata/convert-document
docker run -p 3000:3000 -ti alephdata/convert-documentOnce the service has initialised, files can be sent to the /convert endpoint, and a PDF version
will be returned as a download:
curl -o out.pdf -F format=pdf -F '[email protected]' http://localhost:3000/convertTo build, run:
docker build --rm -t alephdata/convert-document .To get a development shell:
make shellForced restart
make build && docker-compose -f docker-compose.dev.yml stop convert-document && docker-compose -f docker-compose.dev.yml up -d convert-documentMIT, see LICENSE.
LibreOfficekeeps crashing on startup withFatal exception: Signal 11
If AppArmor is running on the host machine, it may be blocking LibreOffice from starting up.
Try disabling the AppArmor profiles related to LibreOffice by following these instructions: https://askubuntu.com/a/1214363