mileszs/wicked_pdf — Issue #85: Can't get Wicked to render svg originating from javascript
Author: sohara
Created: 2012-02-11 03:56:21+00:00
State: open

I am trying to get wicked pdf to render a google chart that uses their javascript api. I have successfully rendered the chart using the wkhtmltopdf binary but when I try to render it using the wicked_pdf_gem through rails I'm not having any luck. Are there features of wkhtmltopdf that are not available through wicked_pdf?

In my layout I have the following:

```erb
<%= content_for :head do %>

<% end -%>

Testing PDFs w/ Javascript

```

And in my controller I have:

```ruby
def index
respond_to do |format|
format.html
format.pdf do
render :pdf => "file_name",
:template => "index/index.html.erb"
end
end
end
```
When I issue the command:

```bash
bundle exec wkhtmltopdf 'http://localhost:3000/index' - > test.pdf
```

The output is a pdf with the javascript-based chart properly rendered. But when I visit the url in my browser wicked_pdf doesn't render the chart. I am guessing that this should work. Is there something I'm missing?

Thanks,
Sean