BoldSignA modern eSignature application with affordable pricing. Sign up today for unlimited document usage!
It appears that the DiagramModel.Save method is able to save a diagram's XML to the machine on which the application is running. That is all I have seen, in the samples I have found so far.
In my case, the application will be running on a web server. Is there a technique by which the diagram's XML can be saved to an individual user's local drive?
Hi Jeff,
We are currently working on your requirement. We will update you the status on 5/12/2014.
Please let me know if any concerns.
Regards,
Shyam G
Thank you, Shyam.
If there is no easy solution with existing functionality, here is what I would suggest for a future feature:
With the two methods I describe above, one that sets the XML string for, and one that gets the XML string from, the DiagramModel, I have ultimately flexibility. I can save and load the XML to/from a local file on the user's system, a blob in Azure Storage, a database column, etc.
Hi Jeff,
Diagram is serialized using DiagramModel.Save method, it take file name with full path as its argument as shown in the following code snippet.
Code Snippet:
diagramView.Model.Save(“D:\\filepath\fileName.xml”);
Once this function is executed, a diagram will be serialized and stored in the given file path. Later you can read this file in application level for further processing.
Currently we don’t have support to get serialized object as a string. We have considered this as feature request “Option to get the serialized diagram as a string” , and we have created an incident 124771 however to access this, we request you to login to your direct Trac account to view this incident for more details.
Our Direct Trac support system can be accessed from the following link:
https://www.syncfusion.com/account/login?ReturnUrl=%2fsupport%2fdirecttrac%2fincidents
Please let me know if any concerns.
Regards,
Shyam G
Thank you for your efforts, and for creating the incident related to a feature request. My comments re: the "option to get the serialized diagram as a string" are a suggestion for future feature improvements.
However, my immediate need is to write, and then read, a diagram's XML file to/from a location other than the server's file system. Since my application will be hosted with a PaaS provider, there is no file space for me to write to except the file space of the application itself. As you can imagine, that space is very limited.
Is the only option to use DiagramModel.Save and DiagramModel.Load, to write to and then read from the server's file system?
Hi Jeff
Thanks for the update.
We have two option to use DiagramModel.Load and DiagramModel.Save method. One is XML file and another is MemoryStream.
Using XML File:
DiagramModel.Save and DiagramModel.Load methods allows you to save to and then load from the server file system.
Using MemoryStream:
DiagramModel.Save and DiagramModel.Load methods allows you to save to and then load from the memory, As already discussed, we consider saving and loading through string variable as a feature request.
Please let me know if any concerns.
Regards,
Shyam G