KnpSnappyBundle中FOSJsRoutingBundle路径出错

时间:2016-06-22 18:46:43

标签: symfony-2.3

我正在使用Symfony和KnpSnappyBudle的2.3版来生成Twig HTML到PDF的模板。我在添加图片时遇到了问题,但我看到使用URL请求在线解决方案已经解决。 示例:src = "{{app.request.scheme ~ ': //' ~ app.request.httpHost ~ asset ('img / logo.png')}}"

现在我遇到了一个无法解决的问题。我正在使用FOSJsRoutingBundle生成路径,并使用KnpSnappyBundle转换为pdf的模板我有以下内容:

     <Script type = "text / javascript" src = "{{path ('fos_js_routing_js', {" callback ":" fos.Router.setData "})}}"> </ script>

使用此行生成pdf会给我以下错误(在请求使用路径之前给我图像的同样错误):

The exit status code '1' says something went wrong:
stderr: "Loading pages (1/6)
[> ] 0%
[======> ] 10%
QSslSocket: cannot resolve SSLv3_client_method
QSslSocket: cannot resolve SSLv3_server_method
[=======> ] 13%
[==========> ] 18%
[==========================> ] 44%
[============================> ] 47%
[==============================> ] 50%
[==============================> ] 50%
[===========================================> ] 73%
[==============================================> ] 78%
[============================================================] 100%
Counting pages (2/6)
[============================================================] Object 1 of 1
Resolving links (4/6)
[============================================================] Object 1 of 1
Loading headers and footers (5/6)
Printing pages (6/6)
[> ] Preparing
[============================================================] Page 1 of 1
Done
Exit with code 1 due to network error: ContentNotFoundError
"stdout: ""
command: /opt/lampp/htdocs/Symfony/app/../vendor/h4cc/wkhtmltopdf-amd64/bin/wkhtmltopdf-amd64 --lowquality --page-size 'A4' --viewport-size '‘1024x768’' '/tmp/knp_snappy576ad837d24a82.40556276.html' '/tmp/knp_snappy576ad837d25009.94614572.pdf'.

有没有办法改变它的工作?我正在开始这个,所以我很感激你的帮助。

0 个答案:

没有答案