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

Unable to download the diagram in diagram component

Thread ID:

Created:

Updated:

Platform:

Replies:

148357 Oct 16,2019 10:27 AM UTC Nov 8,2019 04:09 AM UTC React - EJ 2 5
loading
Tags: Diagram
Sudhanshu Jain
Asked On October 16, 2019 10:27 AM UTC

Hi,

I tried to call exportDiagram in diagram with the below option but unable to download.

const options: IExportOptions = { fileName: 'diagram', format: 'PNG',
  mode: 'Download', type: 'image', region: 'PageSettings' };
const diagram = document.getElementById('diagramPanel');
diagram.ej2_instances[NUMBER0].exportDiagram(options);

When i tried to debug, was able to see that this.printandExportModule condition in diagram.js was undefined.

Could you please suggest if any other data has to be set apart from the above code?

Regards,
Sudhanshu

Shyam G [Syncfusion]
Replied On October 17, 2019 09:25 AM UTC

Hi Sudhanshu, 
 
To use print and export, we need to inject PrintAndExport Module in the application. Please refer to a code example, sample and help documentation. 
 
Code example: 
//inject print and export module 
Diagram.Inject(PrintAndExport) 
 
 
 
The diagram component is divided into individual feature-wise modules. In order to use a particular feature, inject the required module. please refer to the below help documentation for more details. 
 
 
Regards, 
Shyam G 


Sudhanshu Jain
Replied On November 5, 2019 03:32 PM UTC

Hi Shyam,

I tried the solution you have provided, but only a part of diagram is getting captured in the downloaded image. Is there any other attribute to be set along?

Regards,
Sudhanshu

Shyam G [Syncfusion]
Replied On November 6, 2019 12:46 PM UTC

Hi Sudhanshu, 
 
If you have set export arguments multiplePage as true, then the multiple image files will be downloaded based on the diagram content and if it is false, the diagram content will be scaled and exported as a single image file. Could you please check in the below sample?. Also, please check whether your browser blocks downloading the multiple files. Still if you face issues, please share us more details such as modify the below sample. 
 
 
Regards, 
Shyam G 


Sudhanshu Jain
Replied On November 7, 2019 05:52 AM UTC

Hi Shyam,

Thanks for the information and sample, could you please confirm if there is any limitation on the size(i.e. max width or height) of the workflow within the canvas which can be captured as png?

Regards,
Sudhanshu

Shyam G [Syncfusion]
Replied On November 8, 2019 04:09 AM UTC

Hi Sudhanshu, 
 
There is no limitation on the size of the workflow. You can export workflow of larger size. 
 
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