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
----------------------------------------------------------------------------------------------------
Thank You.
Best Wishes,
BalaRaju Vankala,
--
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit https://groups.google.com/groups/opt_out.
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
----------------------------------------------------------------------------------------------------
Thank You.
Best Wishes,
BalaRaju Vankala,
--
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit https://groups.google.com/groups/opt_out.
Comment out the below line from application.rb file.
"config.middleware.use "PDFKit::Middleware",
:print_media_type => true
On Wed, Jan 16, 2013 at 7:44 AM, BalaRaju Vankala
<foreverbala4u-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>wrote:
>
>
>
>
> 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
>
>
>
>
----------------------------------------------------------------------------------------------------
> Thank You.
>
> Best Wishes,
>
> BalaRaju Vankala,
>
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Ruby on Rails: Talk" group.
> To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> To unsubscribe from this group, send email to
>
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>
--
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit
https://groups.google.com/d/msgid/rubyonrails-talk/CAJpsX0AqEBVM5rd8OyLQWSe%3DxPSWsuN5xE1rYj2KD7y6rNiHQA%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.
you can see this also: http://stackoverflow.com/questions/8044659/pdfkit-does-not-style-pdfs On Tue, Jun 18, 2013 at 8:22 AM, amit gupta <amitg3112-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Comment out the below line from application.rb file. > "config.middleware.use "PDFKit::Middleware", :print_media_type => true > > > On Wed, Jan 16, 2013 at 7:44 AM, BalaRaju Vankala <foreverbala4u-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org > > wrote: > >> >> >> >> >> 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 >> >> >> >> ---------------------------------------------------------------------------------------------------- >> Thank You. >> >> Best Wishes, >> >> BalaRaju Vankala, >> >> >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Ruby on Rails: Talk" group. >> To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> To unsubscribe from this group, send email to >> rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> For more options, visit https://groups.google.com/groups/opt_out. >> >> >> > >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAJpsX0ATfn%3DFbJsNfb4S9z8Rn-5U%3D-3YyHT%3DMyBUhXuxga5NRw%40mail.gmail.com. For more options, visit https://groups.google.com/groups/opt_out.