title: SVG to PDF conversion working for Plotly.js but not for C3.js
body: <p>I am using css2pdf for saving my svg chart to pdf after onclick event. It works nicely for plotly.js, but not for c3.js - please see my fiddle: <a href="http://jsfiddle.net/3hs7cs4f/" rel="nofollow noreferrer">http://jsfiddle.net/3hs7cs4f/</a></p>
  
  <p>I am sure it has to do something with the c3.js svg properties, but I have no idea how to solve this.</p>
  
  <p>Here is the code:</p>
  
  <pre><code>&lt;link href="https://cdnjs.cloudflare.com/ajax/libs/c3/0.4.10/c3.min.css" rel="stylesheet" /&gt;
  &lt;script src="https://cdn.plot.ly/plotly-latest.min.js"&gt;&lt;/script&gt;
  &lt;script src="http://www.cloudformatter.com/Resources/Pages/CSS2Pdf/Scrip /xeponline.jqplugin.js"&gt;&lt;/script&gt;
  &lt;script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"&gt;&lt;/script&gt;
  &lt;script src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.5/d3.min.js"&gt;&lt;/script&gt;
  &lt;script src="https://cdnjs.cloudflare.com/ajax/libs/c3/0.4.10/c3.min.js"&gt;&lt;/script&gt;
  &lt;/head&gt;
  
  &lt;body&gt;
  &lt;br&gt;&lt;br&gt;
    &lt;!-- Source and on-click event for plotly.js --&gt;
    &lt;div id="plotly_chart" style="width: 90%; height: 270px"&gt;&lt;/div&gt;
    &lt;button onclick="return xepOnline.Formatter.Format('plotly_chart',{pageWidth:'11in', pageHeight:'8.5in',render:'download', srctype:'svg'});"&gt;Get plotly_PDF&lt;/button&gt;
  
    &lt;!-- Source and on-click event for c3.js--&gt;
    &lt;div id="c3_chart" style="width: 90%; height: 270px"&gt;&lt;/div&gt;
    &lt;button onclick="return xepOnline.Formatter.Format('c3_chart',{pageWidth:'11in', pageHeight:'8.5in',render:'download', srctype:'svg'});"&gt;Get c3_PDF&lt;/button&gt;
  
  &lt;!-- JAVASCRIPT for plotly.js chart --&gt;
  &lt;script type="text/javascript"&gt;
    Chart = document.getElementById('plotly_chart');
  
   Plotly.plot( Chart, [{
     x: [1, 2, 3, 4, 5],
     y: [1, 2, 4, 8, 16] }], { 
     margin: { t: 0 } } );
  &lt;/script&gt;
  
  &lt;!-- JAVASCRIPT for j3.js chart --&gt;
  &lt;script type="text/javascript"&gt;
     var chart = c3.generate({
     bindto: '#c3_chart',
     padding: {
         top: 10,
         right: 70,
         bottom: 50,
         left: 75,
     },
     data: {
         columns: [
             ['data1', 100, 200, 150, 300, 200],
             ['data2', 400, 500, 250, 700, 300],
         ]
     }});
  &lt;/script&gt;
  </code></pre>
  
  <p>I tried a lot of other ways to save my c3.js charts, but none of them worked satisfyingly. The only thing that works is the ng-c3 exporter from annatomka, which uses the AngularJS module (<a href="https://github.com/annatomka/ng-c3-export" rel="nofollow noreferrer">https://github.com/annatomka/ng-c3-export</a>). However, this one does not handle all of the css settings in my hands, and the quality of the downloaded png is limited by screen resolution. Thus, I really would like to go for a pdf exporter, and the one I found that handles all the css settings is css2pdf. But any other suggestions how to save c3 chart as pdf that work are also much appreciated. Thanks for the help!</p>