We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Exporting diagram results in error: Tainted canvases may not be exported.

Thread ID:

Created:

Updated:

Platform:

Replies:

146373 Aug 1,2019 06:42 PM UTC Aug 5,2019 04:18 AM UTC ASP.NET MVC - EJ 2 5
loading
Tags: Diagram
Chad Carey
Asked On August 1, 2019 06:42 PM UTC

I am trying to export and it was working fine but now it is telling me this when I try to export.

Failed to execute 'toDataURL' on 'HTMLCanvasElement': Tainted canvases may not be exported. What would cause this?

Chad Carey
Replied On August 1, 2019 06:46 PM UTC

this seems ot have something to do with ImageElements, which is another problem I'm having (https://www.syncfusion.com/forums/146368/imageelement-doesn39t-always-show-images)

If the images are not loaded or not loading at all, export works. If the images load, even partially, the export breaks.

Shyam G [Syncfusion]
Replied On August 2, 2019 11:21 AM UTC

Hi Chad, 
 
Query 
Response 
Failed to execute 'toDataURL' on 'HTMLCanvasElement': Tainted canvases may not be exported. What would cause this? 
 
If the images are not loaded or not loading at all, export works. If the images load, even partially, the export breaks.  
The image either should be hosted in an application or it should in same domain, so only the image will be exported. It is an behavior of JavaScript. Please refer to our help documentation. 
 
 
We have created a sample in which we have rendered an layout sample. The image rendered in layout is hosted in the application. 
 
 
 
 
 
Regards, 
Shyam G 


Shyam G [Syncfusion]
Replied On August 2, 2019 11:34 AM UTC

Hi Chad, 
 
Please ignore our previous update 
 
Query 
Response 
Failed to execute 'toDataURL' on 'HTMLCanvasElement': Tainted canvases may not be exported. What would cause this? 
 
If the images are not loaded or not loading at all, export works. If the images load, even partially, the export breaks.  
The image either should be hosted in an application or it should in same domain, so only the image will be exported. It is an behavior of JavaScript. Please refer to our help documentation. 
 
 
We have created a sample in which we have rendered an layout sample. The image rendered in layout is hosted in the application. 
 
 
 
 
 
 
Regards, 
Shyam G 


Chad Carey
Replied On August 2, 2019 12:56 PM UTC

I will test that. they were being pulled from a repository we have that is on a different domain than the ones I am testing with. thank you.

Shyam G [Syncfusion]
Replied On August 5, 2019 04:18 AM UTC

Hi Chad, 
We will wait to hear from you. 
Regards, 
Shyam G 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon