docker中安装wkhtmltopdf

RUN apt-get update && \
    apt-get -yq update && \
    apt-get install -y xvfb && \
    apt-get install -y xvfb libxfont1 xfonts-encodings xfonts-utils xfonts-base xfonts-75dpi && \
    apt-get install -y wkhtmltopdf

COPY libs/simsun.ttf /usr/share/fonts/   # 需要把中文字体copy到/usr/share/fonts/不然pdf中文不显示

 

posted @ 2020-08-09 14:44  Moses^  阅读(2147)  评论(0编辑  收藏  举报