Uploaded image for project: 'ZK Charts'
  1. ZK Charts
  2. ZKCHARTS-78

Wrong encoding of Chinese characters in client side PDF export

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Normal
    • 10.2.1.0
    • 3.0.3
    • Security Level: Jimmy
    • None

    Description

      Steps to Reproduce

      1. run the code

      <charts type="pie" title="中文"/>
      

      2. in built-in export button, select "download PDF document"

      Current Result

      Expected Result

      Chinese characters are correct in PDF

      Debug Information

      • exported image files don't have such issue

      Workaround

      • https://github.com/highcharts/highcharts/issues/6417
            // a workaround: change to export PDF via export.highcharts.com instead of local javascript exporting
            // ref: https://github.com/highcharts/highcharts/issues/6417
            Highcharts.wrap(Highcharts.Chart.prototype, 'exportChartLocal', function (proceed, options) {
                    if (options && options.type === 'application/pdf') {
                 this.exportChart(options);
                } else {
                    proceed.call(this, options);
                }
            });
        

      Attachments

        Activity

          People

            jumperchen jumperchen
            hawk hawk
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: