简体   繁体   中英

ReferenceError: xepOnline is not defined when downloading PDF in JSFiddle

I want to download GoogleChart as pdf using jQuery and I use the code below. When I run the code, it shows an error:

ReferenceError: xepOnline is not defined

How can I download my PDF?

<!-- Convert the SVG to PDF and download it -->
var click="return xepOnline.Formatter.Format('JSFiddle', {render:'download', srctype:'svg'})";
jQuery('#buttons').append('<button onclick="'+ click +'">PDF</button>');

<!-- Convert the SVG to PNG @ 120dpi and open it -->
click="return xepOnline.Formatter.Format('JSFiddle', {render:'newwin', mimeType:'image/png', resolution:'120', srctype:'svg'})";
jQuery('#buttons').append('<button onclick="'+ click +'">PNG @120dpi</button>');

<!-- Convert the SVG to JPG @ 300dpi and open it -->
click="return xepOnline.Formatter.Format('JSFiddle', {render:'newwin', mimeType:'image/jpg', resolution:'300', srctype:'svg'})";
jQuery('#buttons').append('<button onclick="'+ click +'">JPG @300dpi</button>');

JSFiddle example.

When I used HighCharts.js export features I catched the 'xepOnline is not defined' error. The problem's source is missing xepOnline.jqPlugin.js library.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM