Docker image for a pandoc/latex container with additionally installed Weasyprint and a few fonts.
2.7K
This is a utility container image based on the pandoc/latex image with the alpine wasyprint package and some additional fonts installed (using the same fonts as the docker-wkhtmltopdf image by Surnet).
What I wanted was the option to use CSS to quickly format the PDF output -- of course that's probably possible with LaTex (probably much better and more fine-grained) but so far I lacked the time to get into that, while I work with CSS for almost twenty years by now.
This thing is in no way perfect, but it allows me to make decently layouted PDFs form last minute presentation scripts I originally wrote in Markdown. Maybe can be useful for you too.
To use this container, you can mount a directory containing your markdown file and a CSS file to the container. For example, from your working folder containing these files you could run the following command:
docker run --rm -v ./:/data --user $(id -u):$(id -g) fpod/docker-weasyprint README.md --pdf-engine=weasyprint --css=/data/styles.css -o talk.pdf
Note that you need to replace README.md, styles.css and talk.pdf with your own filenames.
You can find the Dockerfile for this image at https://github.com/fpodschwadek/pandoc-weasyprint.
Content type
Image
Digest
sha256:d4626d079…
Size
279.6 MB
Last updated
over 1 year ago
docker pull fpod/pandoc-weasyprint