Hi Shyam,
I made some minor tweaks to the sample that you provided but I'm still getting the same message.
I've attached a screenshot - the console message I write can be seen there.
I'm running Safari version 9.1.2 (11601.7.7) on OS X El Capitan Version 10.11.6
I detect Safari and then call the following function (from your sample).
I added
region: "pageSettings" - although this has no effect on the export.
function exportDiagramInSafari(imgType, downloadFileName) {
// Function provided by Syncfusion for exporting diagrams from Safari
console.log('Entering exportDiagramInSafari - imgType: ' + imgType + ' downloadFileName: ' + downloadFileName);
var content = diagram.exportDiagram({
fileName: downloadFileName, region: "pageSettings",
mode: "download"
});
content = content.replace(/^data:[a-z]*;,/, '');
var image1 = content.split(',');
var byteString = atob(image1[1]);
var buffer = new ArrayBuffer(byteString.length);
var intArray = new Uint8Array(buffer);
for (var i = 0; i < byteString.length; i++) {
intArray[i] = byteString.charCodeAt(i);
}
var blob = new Blob([buffer], { type: 'application/octet-binary' });
var pom = document.createElement('a');
var url = URL.createObjectURL(blob);
pom.rel='nofollow' href = url;
//safari doesn't support download attribute and it takes fileName and filetype as unknown.
var fileName = downloadFileName, fileType = imgType;
pom.setAttribute('download', fileName + '.' + fileType);
if (document.createEvent) {
var e = document.createEvent("MouseEvents");
e.initMouseEvent("click", true, true, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null);
pom.dispatchEvent(e);
} else if (pom.fireEvent) {
pom.fireEvent("onclick");
}
}
Any suggestions?
Thanks
Jim
Attachment:
Screen_Shot_20160831_at_9.28.40_AM_8666d868.zip