This repository has been archived on 2023-03-26. You can view files and clone it, but cannot push or open issues or pull requests.
md-pdf-rs/.circleci/wkhtmltopdf.sh

18 lines
574 B
Bash
Raw Normal View History

2017-08-27 22:30:09 +01:00
#!/usr/bin/env bash
2017-08-27 23:00:13 +01:00
# https://github.com/JazzCore/python-pdfkit/wiki/Using-wkhtmltopdf-without-X-server
2017-08-27 22:30:09 +01:00
set -e
2017-08-27 23:21:53 +01:00
apt-get install wkhtmltopdf xvfb -y
2017-08-27 23:13:27 +01:00
wget https://downloads.wkhtmltopdf.org/0.12/0.12.4/wkhtmltox-0.12.4_linux-generic-amd64.tar.xz
tar -xJf wkhtmltox-0.12.4_linux-generic-amd64.tar.xz
cd wkhtmltox
chown root:root bin/wkhtmltopdf
cp -r * /usr/
2017-08-27 23:16:28 +01:00
echo -e '#!/bin/bash\nxvfb-run -a --server-args="-screen 0, 1024x768x24" /usr/bin/wkhtmltopdf $*' > /usr/bin/wkhtmltopdf.sh
2017-08-27 23:00:13 +01:00
chmod a+x /usr/bin/wkhtmltopdf.sh
ln -s /usr/bin/wkhtmltopdf.sh /usr/local/bin/wkhtmltopdf