Failed To Execute Error Pdf Could Not Be Generated
Contents |
Sign in Pricing Blog Support Search GitHub This (sometimes it will work just to ignore this error with --ignore-load-errors) repository Watch 45 Star 2,126 Fork 396 mileszs/wicked_pdf Code
Error: Pdf Could Not Be Generated! Wicked_pdf
Issues 109 Pull requests 7 Projects 0 Wiki Pulse Graphs New issue RuntimeError (Error:
Error: Failed To Execute: Wkhtmltopdf
Failed to execute: "/usr/bin/wkhtmltopdf" #361 Open kannathasan-san opened this Issue Nov 20, 2014 · 24 comments Projects None yet Labels None
Bad Wkhtmltopdf's Path
yet Milestone No milestone Assignees No one assigned 19 participants kannathasan-san commented Nov 20, 2014 I am using wkhtmltopdf(0.10.0 rc2) and wicked_pdf(0.9.9) for generating pdf report. While running i got the following error. RuntimeError (Error: Failed to execute: ["/usr/bin/wkhtmltopdf", "-q", "--page-size", "A4", wicked_pdf gem "--margin-top", "5", "--margin-bottom", "10", "--margin-left", "5", "--margin-right", "5", "file:////tmp/[\"wicked_pdf\", \".html\"]21873-0", "/tmp/[\"wicked_pdf_generated_file\", \".pdf\"]21873-0"] Error: PDF could not be generated! Command Error: Error: Failed loading page file:////tmp/["wicked_pdf", ".html"]21873-0 (sometimes it will work just to ignore this error with --load-error-handling ignore) ) my controller are: render :pdf => "#{@note_name}",:layout => '/layouts/pdf_template.html.erb', :template=>'pdf/financial/maintenance_exp/maintenance_exp_pdf.html.erb' Any help would be appreciated. FYI:when I do :show_as_html=>true its not throwing any error.its rendering the html in browser. Collaborator unixmonkey commented Nov 20, 2014 Could you try pointing your Gemfile at the master branch and let me know if that helps? The currently released gem versions are designed to work with wkhtmltopdf 0.9.9 and earlier, and we are working the kinks out for later versions at the moment. gem 'wicked_pdf', github: 'mileszs/wicked_pdf' kannathasan-railsfactory commented Nov 21, 2014 Yes I tried the same.its
Sign in Pricing Blog Support Search GitHub This repository Watch 45 Star 2,126 Fork 396 mileszs/wicked_pdf Code Issues wkhtmltopdf-binary 109 Pull requests 7 Projects 0 Wiki Pulse Graphs New issue wkhtmltopdf binary edge "Run Time error - Failed to execute Error : PDF could not be generated" #197 Closed install wkhtmltopdf ubuntu rkjha opened this Issue Mar 11, 2013 · 3 comments Projects None yet Labels None yet Milestone No milestone Assignees No one assigned 2 https://github.com/mileszs/wicked_pdf/issues/361 participants rkjha commented Mar 11, 2013 First I was using wkhtmktopdf (installed from Ubuntu Package Repository, with apt-get install) - later I tried using wkhtmltopdf-binary but I'm still getting the same kind of error : RuntimeError (Failed to execute: "path_to_wkhtmltopdf(system or gem binary)" -q "file:////tmp /wicked_pdf20130311-961-1n0pce.html" "/tmp/wicked_pdf_generated_file20130311-961-78sin0.pdf" Error: PDF could not be generated!): controller https://github.com/mileszs/wicked_pdf/issues/197 : respond_to do |format| format.html format.pdf do render :pdf => "file_name", :layout => "pdf.html" end end sharpyfox commented Mar 11, 2013 Which version of the wicked_pdf gem you are using? Can you install it from this repo directly? This commit 687c978 add error explanation in output. rkjha commented Mar 11, 2013 I'm using wicked_pdf 0.9.4 rkjha commented Mar 11, 2013 I updated gems and bundler, then I manually added a wkhtmltopdf static binary to get rid of Run Time error (http://stackoverflow.com/questions/7723937/wkhtmltopdf-runtimeerror-location-of-wkhtmltopdf-unknown) and it works! :) rkjha closed this Mar 23, 2013 Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment Contact GitHub API Training Shop Blog About © 2016 GitHub, Inc. Terms Privacy Security Status Help You can't perform that action at this time. You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings http://stackoverflow.com/questions/14851932/error-pdf-could-not-be-generated-with-wickedpdf and policies of this site About Us Learn more about Stack http://stackoverflow.com/questions/26313759/pdf-could-not-be-generated-with-wkhtmltopdf-in-rails Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; failed to it only takes a minute: Sign up “Error: PDF could not be generated!” with WickedPDF up vote 3 down vote favorite Error: RuntimeError in BillsController#printing Failed to execute: "/usr/local/bin/wkhtmltopdf" -q "file:////var/folders/j5/2wx0qdjj7kl7vbvq3m2z4rj00000gn/T/wicked_pdf20130213-41259-x9dcb5.html" "/var/folders/j5/2wx0qdjj7kl7vbvq3m2z4rj00000gn/T/wicked_pdf_generated_file20130213-41259-mg4iqp.pdf" Error: PDF could not be generated! BillsController: # GET /bills # GET /bills.json def print respond_to do |format| format.html format.pdf do render :pdf => "rechnung_id", :layout => "printing.pdf", failed to execute :show_as_html => params[:debug] end end end as views I created a printing.html.erb and a printing.pdf.erb - and tried both. I've installed wkhtmltopdf as binary and as gem. When I try to use the gem (commenting out the line: WickedPdf.config = { :exe_path => '/usr/local/bin/wkhtmltopdf'} something seems to crash and nothing happens.. When I use the binary, I get the error displayed on top. The versions of my gems are: wicked_pdf (0.9.4) and wkhtmltopdf-binary (0.9.9.1). I was searching for help - that's what I already tried: "bundle update" and "bundle install" installed wkhtmltopdf in version 9.9 added "Mime::Type.register "application/pdf", :pdf" EDIT: If I use the terminal and enter "wkhtmltopdf www.myHomepage.info myhomepage.pdf" it works fine. "which wkhtmltopdf" gives me the path "/usr/bin/wkhtmltopdf", but if I want to use with one, it's opening "wkhtmltopdf_darwin_386" and the website freezes.. ruby-on-rails wicked-pdf share|improve this question edited Feb 13 '13 at 11:02 asked Feb 13 '13 at 10:56 Adrian 15717 add a comment| 1 Answer 1 active oldest votes up vote 1 down vote accepted now i solved the problem. I changed
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up PDF could not be generated!” with wkhtmltopdf in rails up vote 0 down vote favorite I am using wkhtmltopdf(0.10.0 rc2) AND Wicked_pdf(0.9.4) for generating pdf report. I am getting below error Failed to execute: "/usr/bin/wkhtmltopdf" -q --footer-left "[page]" --footer-right "Powered by AMP" --footer-font-size 7 --margin-top 5 --margin-bottom 10 --margin-left 10 --margin-right 10 --page-size "A4" "file:////tmp/["wicked_pdf", ".html"]29083-0" "/tmp/["wicked_pdf_generated_file", ".pdf"]29083-0" Error: PDF could not be generated! my controller: render :pdf => "#{@note_name}",:layout => '/layouts/pdf_template.html.erb', :template=>'/leasing_activity/lease_act_pdf.html.erb' gemfile: gem "wicked_pdf","0.9.4" gem "wkhtmltopdf-binary" initializers/wicked_pdf.rb: WickedPdf.config = { :exe_path => '/usr/bin/wkhtmltopdf' } ruby-on-rails wkhtmltopdf wicked-pdf share|improve this question asked Oct 11 '14 at 10:41 kannathasan paramasivam 52 That tempfile path is messed up. Not 100% sure why, but wicked_pdf version 0.9.4 is for wkhtmltopdf versions less than 10. Try either downgrading wkhtmltopdf or using wicked_pdf master in your Gemfile: gem 'wicked_pdf', github: 'mileszs/wicked_pdf' –Unixmonkey Oct 13 '14 at 2:11 Yeah that path is really not right. Try running said command in the console and see what happens. Also the command line arguments have double spaces, but I don't think it's that serious - but annoying anyway. I use wkhtmltopdf with c# and calling it directly instead of using a wrapper is very easy, I'm guessing ruby can do that just as well, so I suggest you try th