title: Render Svg to Pdf using jspdf
body: <p>I am having trouble in rendering svg element to pdf using jspdf . Iam using plugin <a href="https://github.com/CBiX/svgToPdf.js/" rel="noreferrer">https://github.com/CBiX/svgToPdf.js/</a> to do this.</p>
  
  <p>Below is my code</p>
  
  <pre><code>// I recommend to keep the svg visible as a preview
  var tmp = document.getElementById("chartContainer");
  var svgDoc = tmp.getElementsByTagName("svg")[0];
  var pdf = new jsPDF('p', 'pt', 'a4');
  svgElementToPdf(svgDoc, pdf, {
  scale: 72 / 96, // this is the ratio of px to pt units
  removeInvalid: false // this removes elements that could not be translated to pdf from the source        svg
  });
  pdf.output('datauri'); // use output() to get the jsPDF buffer
  </code></pre>
  
  <p>It is generarting blank pdf. Please help</p>