title: converting svg to pdf returning empty pdf file
body: <p>I am working from the following example:
  <a href="http://jsfiddle.net/p4s5k59s/1222/" rel="nofollow noreferrer">http://jsfiddle.net/p4s5k59s/1222/</a></p>
  
  <p>Trying to convert a plotly.js svg element into a pdf image/file.</p>
  
  <p>Controller function:</p>
  
  <pre><code>  $scope.savePdf = function(){
      html2canvas($("#graphRender"), {
          onrendered: function(canvas) {   
          console.log(canvas);      
              var imgData = canvas.toDataURL(
                  'image/png');              
              var doc = new jsPDF('p', 'mm');
              doc.addImage(imgData, 'PNG', 1000, 1000);
              doc.save('sample-file.pdf');
          }
      });
    }
  </code></pre>
  
  <p>HTML:
  <a href="https://i.stack.imgur.com/mR4WJ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/mR4WJ.png" alt="enter image description here"></a></p>