Sign inSign up

pbaumgartner/weasyprint

By pbaumgartner

•Updated over 7 years ago

This image will run weasyprint, taking an input.html file and generating an output.pdf

Image
0

1.1K

pbaumgartner/weasyprint repository overview

⁠Weasyprint Docker

This image will run weasyprint. The best thing to do would be to create a function in your .bash_profile like this:

html2pdf() { docker run -it --rm -v $(pwd):/data pbaumgartner/weasyprint "$1" "$2"; }

This will allow you to run something like $ html2pdf input.html output.pdf.

I tried the other available weasyprint images, which seemed to work in certain circumstances, but my issue is that in many cases I need to send a whole directory to the container if I have external css or font files not in the HTML. Thus, sending a payload of just the HTML file doesn't work for some of the existing images.

Tag summary

Content type

Image

Digest

Size

262.4 MB

Last updated

over 7 years ago

docker pull pbaumgartner/weasyprint