PDF 生成使用 PDFKit 和 wkhtmotopdf 挂起 [英] PDF Generation hangs using PDFKit and wkhtmotopdf

查看:35
本文介绍了PDF 生成使用 PDFKit 和 wkhtmotopdf 挂起的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 OSX Lion 上使用自制软件 (0.9.9) 附带的 wkhtmtopdf,突然之间我无法再生成 PDF.当我在 URL 末尾添加 .pdf 时,wkhtmltopdf 进程会启动,但该进程永远不会完成.我怀疑这是 wkhtmltopdf 的问题,因为当我通过 cli 运行它时,该过程也没有完成.当我发出以下命令时,我得到一个 test.pdf 文件,但该过程从未完成,即使它说完成".

I'm on OSX Lion using wkhtmtopdf that came with homebrew (0.9.9) and all of the sudden I cannot generate PDFs anymore. When I tack .pdf on the end of a URL, the wkhtmltopdf process fires up, but the process never completes. I suspect it's an issue with wkhtmltopdf because the process is not completing when I run it via the cli either. When I issue the following command, I get a test.pdf file, but the process never finishes, even though it says "done".

我能做些什么来强制完成这个过程吗?

Is there something I can do to force the process to complete?

curl google.com | wkhtmltopdf - test.pdf

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   219  100   219    0     0   1685      0 --:--:-- --:--:-- --:--:--  5475
Loading page (1/2)
Printing pages (2/2)                                               
Done

推荐答案

事实证明它与 cli 无关,实际上是由于 Jammit 正在开发中运行.禁用 Jammit 修复了 PDFkit 挂起问题.

Turns out it had nothing to do with the cli and it was actually due to Jammit running in development. Disabling Jammit fixes the PDFkit hanging issue.

这篇关于PDF 生成使用 PDFKit 和 wkhtmotopdf 挂起的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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