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. Image for the cookie policy date

Unable to print diagram's SVG nodes (i.e. NodeModels with shape: NativeModel)

Hello Syncfusion Team,

I'm using Syncfusion's diagram control ("@syncfusion/ej2-angular-diagrams": "^17.2.47") in my Angular app.

I have a diagram with the following content on it. 
  1. Connectors (ConnectorModel)
  2. Text (NodeModel with shape: TextModel, style: TextStyleModel)
  3. Basic Shapes (NodeModel with shape: BasicShapeModel, style: ShapeStyleModel)
  4. Native/SVG (NodeModel with shape: NativeModel)

When I print this diagram (using the DiagramComponent's print() method), only #1, #2 and #3 above get printed. The native/SVG content however does not get printed. 

Is this a known issue? If so, any workarounds?


5 Replies

SG Shyam G Syncfusion Team October 10, 2019 03:55 AM UTC

Hi Mithun, 

We don’t have built-in support to export HTML/Native node. We can export native or HTML node to image format using webkit rendering engine. We have created an angular sample in which we have created a HTML nodes and established a connection with connectors. Also, we have placed convertToImage button in angular sample. When you click on button, we send an base64 data from client side to server side. 
In the server side, we convert base64data to image using webkit converter and sent base64data to client side and downloaded an image in client side. Please refer to an sample and video below. 




Regards, 
Shyam G  



MI Mithun October 10, 2019 02:15 PM UTC

Thank you. Trying this out now. 


SG Shyam G Syncfusion Team October 11, 2019 04:02 AM UTC

Hi Mithun, 
Thanks for your update. We will wait to hear from you. 
Regards, 
Shyam G 



MI Mithun October 14, 2019 08:31 AM UTC

I was able to test out the attached angular + server-side samples and it works. I'll now start implementing these in my own project. 

I saw that the server-side sample was compiled as a .NET Framework project. Do you happen to know if it can be converted as a .NET Core project (I'd prefer this since it can run on linux)?


SG Shyam G Syncfusion Team October 15, 2019 12:29 PM UTC

Hi Mithun, 

We have created a server side sample in .NET core and it is available in the below link for download. 


Regards, 
Shyam G 


Loader.
Live Chat Icon For mobile
Up arrow icon