I have installed Wicked PDF on rails 4, and now I have this issue:
RuntimeError in ClientsController#show
Error: Failed to execute: ["C:/Program Files/wkhtmltopdf/bin/wkhtmltopdf.exe", "--footer-center", "Center", "--footer-left", "Left", "--footer-right", "Right", "file://C:/Users/Rashid/AppData/Local/Temp/wicked_pdf20141017-9664-18xoryq.html", "C:/Users/Rashid/AppData/Local/Temp/wicked_pdf_generated_file20141017-9664-zo89le.pdf"] Error: PDF could not be generated! Command Error: Loading pages (1/6) [> ] 0% [======> ] 10% Error: Failed loading page file://c/Users/Rashid/AppData/Local/Temp/wicked_pdf20141017-9664-18xoryq.html (sometimes it will work just to ignore this error with --load-error-handling ignore) Exit with code 1 due to network error: ContentNotFoundError
def show
respond_to do |format|
format.html
format.pdf do
@example_text = "some text"
render :pdf => "file_name",
:template => 'clients/show.pdf.erb',
#:layout => 'pdf',
:footer => {
:center => "Center",
:left => "Left",
:right => "Right"
}
end
end
end
gem "wkhtmltopdf-binary"
in your gemfile? If not then add and runbundle install
– Gagan Gami