2016-12-07 94 views
1

我使用的是amchart版本3.16.I需要自定義消息顯示在amchart下載的pdf圖像中,而不是顯示「已保存:url」。 如何在下載的文件中定製消息?代碼是這樣的。在amchart pdf下載文件中顯示的自定義消息

"menu": [ { 
         "label": "Download", 
         "menu": [ 
          { "label": "PNG", 
           click: function() { 
            this.capture({},function() { 
             this.toPNG({}, function(data) { 
              this.download(data, "image/png", fileName+'.png'); 
             }); 
            });}}, 

          { "label": "JPG", 
           click: function() { 
            this.capture({},function() { 
             this.toJPG({}, function(data) { 
              this.download(data, "image/jpg", fileName+'.jpg'); 
             }); 
            });}}, 

          { "label": "SVG", 
           click: function() { 
            this.capture({},function() { 
             this.toSVG({}, function(data) { 
              this.download(data, "text/xml", fileName+'.svg'); 
             }); 
            });}}, 
          { "label": "PDF", 
           click: function() { 
            this.capture({},function() { 
             this.toPDF({}, function(data) { 
              this.download(data, "application/pdf", fileName+'.pdf'); 
             }); 
            });}}] 

        }, 
        { 
         "label": "Save as..", 
         "menu": [ { "label": "CSV"}, 
          { "label": "XLSX"} 
         ] 

        }, 
        { 
          "label": "Print", 
          "format":"PRINT" 
         }, 
         { "label": "Annotate", 
          "action": "draw", 
          "drawing": 
          { 
           "fontSize": 30 
          } 
         }] 

回答

0

export.js,你可以用這個更改下面的代碼...

["Saved from:", window.location.href, {image: "reference", fit: [523.28, 769.89]}] 

[{image: "reference", fit: [523.28, 769.89]}] 
0

在export.js,你可以發表評論/根據您的需要更改以下代碼...

if (cfg.pageOrigin) { 
        pageContent.push(_this.i18l("label.saved.from")); 
        pageContent.push(window.location.href); 
        pageDimensions[ 1 ] -= (14.064 * 2); 
       } 

================================================ ========================

相關問題