Tuesday, January 25, 2011

[Rails] Re: wkhtmltopdf and PDFkit

I just got the wkhtmltopdf installed on my Mac Snow Leopard and tried to
get the pdfkit to work with Rails 3.0.3

In my application.rb file I have put this:

config.middleware.use PDFKit::Middleware
PDFKit.configure do |config|
config.wkhtmltopdf = '/usr/local/bin/wkhtmltopdf'
end

Now this is SUPPOSED to allow me to add a .pdf extension to my URL's to
get a PDF version of the page, however, when I do that, from that point
on I get ALL pages as pdf. ie. if I then click on a link in the PDF, it
generates another pdf file of the next page, etc.

If I try and just go to a page without the PDF, it continues to generate
PDFs until I stop the server.

Anyone else have this problem?

These are the relevant gems installed:
wkhtmltopdf-binary (0.9.5.1)
pdfkit (0.5.0)
wkhtmltopdf 0.9.9

--
Posted via http://www.ruby-forum.com/.

--
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@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate