문제

I'm trying to generate a PDF file based on an HTML file in a Rails app. I search and I found this wkhtmltopdf engine, but when I try to generate a pdf appending the '.pdf' sufix in my pages it seems to be in a loop that never ends unless I stop the server, which show this error:

command failed: "/usr/bin/wkhtmltopdf" "--page-size" "Letter" "--margin-left" "0.75in" "--margin-right" "0.75in" "--margin-bottom" "0.75in" "--margin-top" "0.75in" "--encoding" "UTF-8" "--quiet" "-" "-"

I'm using pdfkit and wkhtmltopdf-binary gems and MacOS Lion. Does anyone knows how to solve this issue? Thanks

도움이 되었습니까?

해결책

if you follow the exact instructions HERE then your issues should go away. I've used this on several projects without issue. You should also know that there is an issue with scaling content should you happen to deploy to ubuntu and that you need to update wkhtmltopdf.

다른 팁

Yes.. had this too. There is a bug in the gem version of wkhtmltopdf. Download the current release and the convert call will eventually come back.

http://code.google.com/p/wkhtmltopdf/downloads/detail?name=wkhtmltopdf.dmg&can=2&q=

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top