neridaj
neridaj

Reputation: 2183

highcharts-export-clientside Unsupported export format

I'm using highcharts-ng, trying to do client side pdf download and keep getting Unsupported export format on this platform: application/pdf. If I use the highcharts server to generate the pdf it works fine.

options: {
  exporting: {
    type: 'application/pdf'
  }
},
func: function() {
    // button handler
    $('#vehicle-conversion-pdf-btn').click(function () {
        var chart = $('#vehicle-conversion').highcharts();
        chart.exportChart();
    });
}

I'm also loading the plugin last.

Upvotes: 0

Views: 468

Answers (1)

it_nazanin
it_nazanin

Reputation: 177

I had a problem almost like this. I had been imported "highcharts-export-clientside.js" to my web page, but it didn't work. (from this documentation )

my problem fixed with this line :

<script src="http://code.highcharts.com/modules/offline-exporting.js"></script>

Altogether you must have this imports in your html file :

<script src="http://code.highcharts.com/highcharts.js"></script>
<script src="http://code.highcharts.com/modules/exporting.js"></script>
<script src="http://code.highcharts.com/modules/offline-exporting.js"></script>

Upvotes: 1

Related Questions