title: export jqplot to pdf, using the png image generated dynamically
body: <p>I am using jqplot to show charts in my application. I want to export this chart in PDF. To accomplish this, I am planning to generate runtime image of the chart.
  There is button in jqplot which shows image generated from jqplot using javascript. It uses following code. </p>
  
  <pre><code> btn.bind('click', {chart: $(this)}, function(evt) {
                      var imgelem = evt.data.chart.jqplotToImageElem();
                      var div = $(this).nextAll('div.jqplot-image-container').first();
                      div.children('div.jqplot-image-container-content').empty();
                      div.children('div.jqplot-image-container-content').append(imgelem);
                      div.show(500);
                      div = null;
                  });
  </code></pre>
  
  <p>I want to do it at runtime using PHP but I had no idea of how to acheive this. Help me on this.Thanks</p>