Currently we are running a reporting system written in Ruby on Rails with one or more FusionCharts in it depending on the type of the report. Now we recently decided to offer the reports in a printable format and have chosen for a PDF solution where we can convert the HTML report with the chart to a WYSIWYG (What you see is what you get) layout to print and email.
The only problem there though was the rendering of the FusionChart to PDF. Now since the chart itself is being rendered on the clientside it is tricky to make a snapshot of it and place it in the PDF which is generated serverside. It is not an option to use the 'new' built in 'save as image' flash option since that would require user intervention.
I will explain how the report is rendered. In Ruby we have a report object with all the relevant data in it, as well as the XML stream to the chart. The XML and a reference to the SWF are being placed in tags, and finally served with the rest of the textual data to the browser as one HTML stream, which then is rendered on the client. The chart is drawn by the client flash player.
Now I need some way to either render the FusionChart serverside and make a screenshot from it somehow, or use the XML feed (which basically has just values of the bars in the chart, no drawing information which is in the swf itself) to generate a similar image as the client will eventually see. The only specific ruby implementation I have found is located here on this forum: http://www.fusioncharts.com/forum/Topic724-28-3.aspx yet this does not comply with my wishes, as it doesn't draw it as WYSIWYG but some crude colored bars and the needed RubyInline works very poorly and buggy on Windows machines. Besides is it unclear to me how they implemented this (how the image is requested) and where the input is coming from (it seems like it wants an array with color values for all pixels, where do I get that?)
Currently I am clueless where to start on this subject as all search results point to some clientside initiation which is not really applicable for my Ruby implementation. I need to be able to serve 1 dynamically generated image to the PDF renderer. How does one go around doing this? I guess I am not the first one to want to render a FusionChart to a PDF and need to convert it to an image serverside yet so little information about it.
Thanks for the info up front!