2016-12-07 95 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); 
       } 

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

相关问题