问题
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
回答1:
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.
来源:https://stackoverflow.com/questions/10045327/pdf-generation-hangs-using-pdfkit-and-wkhtmotopdf