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

Wrong encoding of Chinese characters in client side PDF export

    Details

    • Type: Bug
    • Status: Open
    • Priority: Later
    • Resolution: Unresolved
    • Affects Version/s: 3.0.3
    • Fix Version/s: None
    • Security Level: Jimmy
    • Labels:
      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

            • Assignee:
              rudyhuang rudyhuang
              Reporter:
              hawk hawk
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: