It's a web server permitting to convert an HTML file to a PDF file.
[POST] /pdf
The only param accepted is an html file (as binary data)
Return a PDF file
If you want to use it in a development env, you can use the Dockerfile.dev
docker build -t [your-image-name] . -f Dockerfile.devAfter that, you can run the image:
docker run --rm -p 4000:80 -v $(pwd):/go/src/github.com/karnott/pdf-print-server [your-image-name] go run main.goWhen the server is running, you can try to convert an html file to a pdf file
curl -X POST http://localhost:4000/pdf --data-binary "@path-to-html-file" -o test.pdfFor production env, you can use the Dockerfile file