Skip to content

A docker container for LibreOffice and unoconv, used to generate PDF files from office-type documents.

License

Notifications You must be signed in to change notification settings

idbara/convert-document

 
 

Repository files navigation

convert-document

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).

Usage

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-document

Once 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 'file=@mydoc.doc' http://localhost:3000/convert

Development

To build, run:

docker build --rm -t alephdata/convert-document .

To get a development shell:

make shell

Forced restart

make build && docker-compose -f docker-compose.dev.yml stop convert-document && docker-compose -f docker-compose.dev.yml up -d convert-document

License

MIT, see LICENSE.

About

A docker container for LibreOffice and unoconv, used to generate PDF files from office-type documents.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 83.6%
  • Dockerfile 12.5%
  • Makefile 3.9%