Integrating Google Charts into a Prawn PDF(please helpme)

i just created an application to show the user details and a pie
chart in one page, also i provided an link on clicking that will
display the result in a pdf file, i am able to get the result in pdf
except the pie chart.i will explain the controller and all below.
there is a variable that gives the pie chart details is defined in
the controller, its showing value like this @pie_chart_url
i created a page called view_campaign_reports.pdf.prawn to show the
user details pie chart. in that page i had given code like this
(i inatalled gem prawn and plugin prawnto and did all plugin
specifications)
pdf.image open(@pie_chart_url)
but i am getttttttting an error like this in controller

URI::InvalidURIError in Reports#view_campaign_reports

Showing app/views/reports/view_campaign_reports.pdf.prawn where line #93
raised:

bad URI(is not URI?):
http://chart.apis.google.com/chart?chs=420x150&cht=p3&chl=Opened+28%|Not+opened+71%&chd=t:28,71

Extracted source (around line #93):

90:
91:
92:
93: pdf.image open(@pie_chart_url), :at => [0, 230], :scale => 0.5
94: thelogo =
“#{RAILS_ROOT}/public/images/email_templates/coupon_rag.png”
95: pdf.image thelogo

But when i use the same @pie_chart_url in the view its able to
display pie chart, but unable to show in pdf , can any one please
help me

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs