Forum: Ruby on Rails Ruby On Rails : PdfKit Runtime Error

Posted by BalaRaju Vankala (Guest)
on 2013-01-16 13:44
(Received via mailing list)
Hello Every One,

I am using PdfKit to download as a PDF  in my application. I did it in 
the
following way but it didn't worked for me

1. In gem file
     gem 'pdfkit'
2.  In config/application.rb
     I add this code
     "*config.middleware.use "PDFKit::Middleware", :print_media_type => 
true
*
3. In show.html.erb
 I added this code
*<p id="pdf_link"><%= link_to "Download Invoice (PDF)", 
order_path(@order,
:format => "pdf") %>**</p>*

But the problem is
PdfKit gem successfully installed in my machine. Then I run gem install
wkhtmltopdf-binary and output was



Well, then tried to access the pdf version of my page. But it also 
showed
me an error *Runtime Error ControllerName#show



[image: Inline image 1]
*


What should I do if  I want to correct output.
Thanks in Advance
Posted by BalaRaju Vankala (Guest)
on 2013-01-16 13:46
(Received via mailing list)
Hello Every One,

I am using PdfKit to download as a PDF  in my application. I did it in 
the
following way but it didn't worked for me

1. In gem file
     gem 'pdfkit'
2.  In config/application.rb
     I add this code
     "*config.middleware.use "PDFKit::Middleware", :print_media_type => 
true
*
3. In show.html.erb
 I added this code
*<p id="pdf_link"><%= link_to "Download Invoice (PDF)", 
order_path(@order,
:format => "pdf") %>**</p>*

But the problem is
PdfKit gem successfully installed in my machine. Then I run gem install
wkhtmltopdf-binary and output was



Well, then tried to access the pdf version of my page. But it also 
showed
me an error *Runtime Error ControllerName#show



[image: Inline image 1]
*


What should I do if  I want  correct output.
Thanks in Advance
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.