Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- FROM python:3.6-slim-stretch
- RUN \
- echo "weasyprint dependencies" \
- && apt-get update \
- && apt-get install -y --no-install-recommends \
- libcairo2 \
- libpango1.0-0 \
- libpangocairo-1.0.0 \
- libgdk-pixbuf2.0-0 \
- shared-mime-info
- RUN \
- echo "imagemagick dependencies" \
- && apt-get update \
- && apt-get install -y --no-install-recommends \
- ghostscript \
- imagemagick
- RUN pip install weasyprint==0.41
- COPY letter.html .
- RUN weasyprint letter.html letter.pdf
- RUN convert -density 300 -depth 8 -quality 85 letter.pdf letter.png
Add Comment
Please, Sign In to add comment