Php openSuSE上的wkhtmltopdf:无法连接到X服务器
我需要openSuSE上的wkhtmltopdf。我已经通过存储库安装了它。版本为0.12.1 要使用Symfony呈现HTML,我使用KnpSnappyBundle。通过呈现细枝模板,我收到以下错误消息:Php openSuSE上的wkhtmltopdf:无法连接到X服务器,php,symfony,pdf-generation,twig,wkhtmltopdf,Php,Symfony,Pdf Generation,Twig,Wkhtmltopdf,我需要openSuSE上的wkhtmltopdf。我已经通过存储库安装了它。版本为0.12.1 要使用Symfony呈现HTML,我使用KnpSnappyBundle。通过呈现细枝模板,我收到以下错误消息: The exit status code '1' says something went wrong: stderr: "wkhtmltopdf: cannot connect to X server " stdout: "" command: /usr/bin/wkhtmltopdf --
The exit status code '1' says something went wrong:
stderr: "wkhtmltopdf: cannot connect to X server
"
stdout: ""
command: /usr/bin/wkhtmltopdf --lowquality '/tmp/knp_snappy557ee05c6bf5f1.66652130.html' '/srv/www/project/web/pdf/document-1.pdf'.
有没有办法以这种方式运行wkhtmltopdf而不出错?谢谢 openSuSE的解决方案:
对于德国用户:openSuSE的解决方案: