cloudify / sPDF

Create PDFs from Scala using plain old HTML and CSS. Uses wkhtmltopdf on the back-end which renders HTML using Webkit.
Other
199 stars 53 forks source link

WKhtmltopdf not able to run as headless in Debian OS #43

Open chungonn opened 6 years ago

chungonn commented 6 years ago

Hi I was not able to run sPDF in Ubuntu 18.04 as WKHtmltopdf is unable to run in Debian as headless. The suggested approach was to use xvfb. Could sPDF be improved to allow it to run with xvfb? Below is a sample of the command xvfb-run -- /usr/bin/wkhtmltopdf --lowquality http://www.google.com google.pdf

I did a fork of the project. I can't a good place to expand the api, hence i did a hardcode to add "-- /usr/bin/wkhtmlpdf" as the argument, where the path is "xvfb-run".

chungonn commented 6 years ago

Hi Federico, I have create a patch to allow auto detect of xvfb-run, this would allow the sPDF to run in a headless debian environment and without any change to the APIs