【发布时间】:2014-10-15 08:48:29
【问题描述】:
我正在尝试在我的 symfony 2 应用程序中生成 PDF - 我需要做什么?现在我通过composer下载了以下包:
https://github.com/KnpLabs/KnpSnappyBundle
但尝试使用它生成 pdf 时出现错误:
The exit status code '126' says something went wrong:
stderr: "sh: /var/www/html/khernik/app/../web/files: is a directory
"
stdout: ""
我认为问题出在配置上——app/config/config.yml:
knp_snappy:
pdf:
enabled: true
binary: %kernel.root_dir%/../web/files
options: []
二进制线...它应该指向哪里?我读过它应该是一些可执行文件... knp bundle 提供它吗?我还尝试下载以下捆绑包:
https://github.com/h4cc/wkhtmltopdf-amd64
但它给了我以下作曲家错误:
no matching package found
我该如何解决这个问题?
谢谢!
【问题讨论】: