Skip to content

Instantly share code, notes, and snippets.



Last active Sep 29, 2020
What would you like to do?
wkhtmltopdf centos 7 headless with xvfb

wkhtmltopdf centos 7 headless with xvfb

Install and run standalone Xvfb

yum install xorg-x11-server-Xvfb
yum install xorg-x11-fonts-Type1 xorg-x11-fonts-75dpi
rpm -ivh wkhtmltox-

vim xvfb.service
cp xvfb.service /etc/systemd/system/xvfb.service
sudo systemctl enable xvfb.service
sudo systemctl start xvfb.service
sudo systemctl status xvfb.service

sudo systemctl daemon-reload

chmod a+rx
./ output.pdf


xvfb-run -a -s "-screen 0 1024x768x24" wkhtmltopdf "$@"
Description=Virtual Frame Buffer X Server
ExecStart=/usr/bin/Xvfb :42 -screen 0 1024x768x24 -ac +extension GLX +render -noreset
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.