Newer
Older
#!/usr/bin/env sh
apk add --no-cache xvfb ttf-freefont fontconfig dbus
apk add qt5-qtbase wkhtmltopdf --no-cache --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing/ --allow-untrusted
mv /usr/bin/wkhtmltopdf /usr/bin/wkhtmltopdf-origin
echo "#!/usr/bin/env sh" >/usr/bin/wkhtmltopdf
echo "Xvfb :0 -screen 0 1024x768x24 -ac +extension GLX +render -noreset &" >>/usr/bin/wkhtmltopdf
echo "DISPLAY=:0.0 wkhtmltopdf-origin $@" >>/usr/bin/wkhtmltopdf
echo "killall Xvfb" >>/usr/bin/wkhtmltopdf
chmod +x /usr/bin/wkhtmltopdf