Skip to content

Weasyprint docker microservice - a free html to pdf conversion web api

License

Notifications You must be signed in to change notification settings

alastair-todd/docker-weasyprint

 
 

Repository files navigation

docker-weasyprint

Build Status

Weasyprint as a microservice in a docker image.

Usage

Run the docker image, exposing port 5001

docker run -p 5001:5001 --name weasyprint alcintra/weasyprint-docker:latest

Simple use: POST to port /pdf on port 5001 with an html body will return a response containing a PDF.

http://127.0.0.1:5001/pdf?filename=payslip.pdf

This will return a response with Content-Type: application/pdf and Content-Disposition: inline; filename=result.pdf headers. The body of the response will be the PDF.

Use in Postman

In addition /health is a health check endpoint and a GET returns 'ok'.

About

Weasyprint docker microservice - a free html to pdf conversion web api

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 86.3%
  • Dockerfile 6.1%
  • CSS 6.0%
  • HTML 1.6%