Docker image to run PDFtk as a webservice.
If you prefer a pre-build version it is available from hub.docker.com just do a regular pull
$ docker pull torfsict/docker-pdftk-webservice
$ docker build -t docker-pdftk-webservice .
Using a locally built version:
$ docker run -d -p 80 --name pdftk docker-pdftk-webservice
Or if you use the pre-built version:
$ docker run -d -p 80 --name pdftk torfsict/docker-pdftk-webservice
Note: at the moment the only supported action is merging PDF files. Other actions will be added on request.
Post the files you want to merge to the server and get the merged file in return.
$ curl -F files[]=@file1.pdf -F files[]=@file2.pdf http://localhost/merge > merged.pdf
Check the status, will return the uptime of the service.
returns
{
pong: 18.849
}