"Wkhtmltopdf未返回任何数据";与CakePHP [英] "Wkhtmltopdf didn't return any data" with CakePHP

查看:64
本文介绍了"Wkhtmltopdf未返回任何数据";与CakePHP的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在运行CakePHP 2.8环境,并希望使用wkhtmltopdf打印PDF.一次,我可以创建一个PDF,然后,由于我在做其他事情,所以已经有几周没有使用它了.今天,我重新开始工作,并收到错误消息:

I am running a CakePHP 2.8 environment and want to print a PDF with wkhtmltopdf. Once, I could create an PDF, then, I didn't used it for few weeks because I was working on something else. Today I restarted to work on that and got the error Message:

"WKHTMLTOPDF didn't return any data" 

APP/Plugin/CakePdf/Pdf/CakePdf.php line 236 → WkHtmlToPdfEngine->output()
APP/Plugin/CakePdf/View/PdfView.php line 97 → CakePdf->output(string)
CORE/Cake/Controller/Controller.php line 963 → PdfView->render(null, null)
CORE/Cake/Routing/Dispatcher.php line 200 → Controller->render()
CORE/Cake/Routing/Dispatcher.php line 167 → Dispatcher->_invoke(InvoicesController, CakeRequest)
APP/webroot/index.php line 109 → Dispatcher->dispatch(CakeRequest, CakeResponse)

我的机器是带有El Capitan的MacBook Pro.此外,我以为可能是El Capitan更新,但后来我将wkhtmltopdf安装到了CakePHP 2.8的同等系统上,并且正在此计算机上运行.不幸的是,我不知道该怎么办.我重新安装了wkhtml并再次更新了CakePHP,但没有机会:-(

My machine is a MacBook Pro with El Capitan. Furthermore, I thought that it might be the El Capitan Update, but then I installed wkhtmltopdf to an equal system with CakePHP 2.8 and it is running on this machine. Unfortunately, I have no idea what I can do. I reinstalled wkhtml and updated CakePHP again, but no chance :-(

有人可以帮助我吗?

推荐答案

最后,我做到了.我首先删除了usr/local/bin上的所有wkhtmltopdf/img文件,然后将wkthmltopdf从64位更改为32位.尽管我有一个64位系统,但它可以在32位系统上运行,但不能在64位系统上运行.不要问我为什么它起作用,但是对我有用!

Finally, I did it. I first deleted all wkhtmltopdf /img files on usr/local/bin and then changed the wkthmltopdf from 64bit to 32bit. Although I have a 64bit system, it is working with the 32bit but not the 64bit. Don't ask me why it is working, but it works for me!

这篇关于"Wkhtmltopdf未返回任何数据";与CakePHP的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆