Graphics

Is thery any way to load svg file to DiagramView?

Dear,

I have found the graphic library can return svg file string. So, I have tried to save svg file on the local, and when user want to open that again, then, we want to show last states of your graphic solution.

As I found out, there is functionality for exporting SVG string for current DiagramWiegetApi. But, there is no import SVG function for showing the last status. If it is possible, could you let me know how to do?

Thanks,
Younglim Han


Dear Younglim Han,

thank you for contacting us.

Currently, it is indeed not possible to import SVG files in the Diagram Widget.

Nevertheless, please note that if you want to store your diagram context, you can serialize it and then later unserialize it using the corresponding functions in the API.

Best regards,

Olivier

Dear Oliver,

Thank you for your information. But, if the canvas size is different with serialized canvas, display view is cut from first view. I want to save vector graphic on the local, so I can see whole display even canvas size is changed. Is it possible to display different canvas, when I try to display unserialized byte array?

Best regards,
Younglim Han

Dear Younglim Han,

Indeed, the serialize/unserialize functions are to save the context of an application. If re-sizing the canvas, the SVG will be truncated. Unfortunately, we do not have any alternative to offer.

Best regards,

Olivier

Login or Signup to post a comment