Make properties default not being saved

Hi,
how does "Make properties default" works? Seems that it is valid only until program exit. When it is started again all is gone. Can't it be somehow saved in program settings?


10 Replies 1 reply marked as answer

DD Divya Dhayalan Syncfusion Team February 28, 2021 07:52 PM UTC

Hi Ondrej, 
 
Thanks for contacting Syncfusion support. 
 
We are currently checking on this and will update further details on 2nd March 2021. 
 
Regards, 
Divya 


VS Vikas Sekar Syncfusion Team March 2, 2021 10:38 PM UTC

Hi Ondrej,  
  
We are facing the reported behavior in PdfViewerControl that default annotation settings was not applied to newly opened PDF document after setting default settings in existing document. We have forwarded this to our development team for further analysis and we will update further details on March 4th, 2020.  
 
Please let us know if our observation is different from that of your requirement. 
  
Regards, 
Vikas 



DD Divya Dhayalan Syncfusion Team March 7, 2021 07:14 AM UTC

Hi Ondrej, 
 
Thank you for your patience. 
 
As we informed earlier, marking default annotation properties was not applied to newly opened PDF document after setting default settings in existing document is a behavior. But we can make the marked default settings will be maintain after we load a new PDF document also by save and reapply them using DocumentUnloaded and DocumentLoaded event handlers. We have created a sample for your reference which can be downloaded from the below link, 
 
We have also created a video for your reference which can be downloaded from the below link, 
 
In the above sample, we have maintained the marked default annotation properties by storing them into the variables when the document gets unloaded and assign the settings from variables when the document gets loaded. 
 
Please let us know if the solution helps to solve your issue or kindly let us know if our observation of your requirement is different from yours.  
 
Regards, 
Divya 
 



OS Ondrej Svoboda March 8, 2021 09:14 AM UTC

Hi, OK this works, but it is not definitely what I expected - saving all the settings one by one. Isn't there a method which would serialize all the settings to some file and then load it back? That would be perfect. 


DD Divya Dhayalan Syncfusion Team March 9, 2021 08:02 PM UTC

Hi Ondrej, 
 
Thank you for your update. 
 
We are checking on the possibilities to achieve your requirement, we will update further details on 11th March 2021. 
 
Regards, 
Divya 



DD Divya Dhayalan Syncfusion Team March 11, 2021 12:04 PM UTC

Hi Ondrej, 
 
Based on your requirement we have modified the sample and it can be downloaded from the below link, 
 
In the above sample, the marked default properties of a line annotation will be fetched from the PdfViewerControl LineAnnotationSettings property and stored as a PdfViewerLineSettings type serialized object into an XML file when a PDF document gets unloaded or close the window. The stored default properties will be assigned to the PdfViewerControl LineAnnotationSettings property after it gets deserialized from the saved XML file when a new document gets loaded into PdfViewer 
 
We have also created a video for your reference, which can be downloaded from the below link, 
 
Please let us know if the above solution helps to solve your issue or if you need any further assistance on this. 
 
Regards, 
Divya


OS Ondrej Svoboda March 15, 2021 03:30 PM UTC

Hi,
so I need to repeat this for all 13 annotation settings (InkAnnotationSettings, HighlightAnnotationSettings, ...) to be able to save/load all the defaults? (and also update it when you add more controls in there)
Would be perfect if you'd provided a method to save and load it all in once - maybe with file path argument. Or some similar solution (auto load and save to some customizable path etc.). I think this would be useful for many other users and without it "make default" checkbox makes not much sense to me.


DD Divya Dhayalan Syncfusion Team March 16, 2021 05:40 PM UTC

Hi Ondrej, 
 
On analyzed further on your requirement, we have modified the sample to save and reload the marked properties all it once. Please download the sample from the below link, 
 
In the above sample, we have exported the annotation settings when we unload/ exit from the application and import the annotation settings when we load the document. In the “ExportAnnotationSettings” method we have stored the list of all annotation settings as a serialized object into an XML file. In the “ImportAnnotationSettings” method the stored annotation settings are deserialized and assigned to their corresponding PdfViewerControl annotation setting.  
 
Please let us know if the above solution is helpful to achieve your requirement or if you need any further assistance on this. 
 
Regards, 
Divya 


Marked as answer

OS Ondrej Svoboda March 17, 2021 03:35 PM UTC

OK, thanks.


DD Divya Dhayalan Syncfusion Team March 18, 2021 06:51 AM UTC

Hi Ondrej, 
 
Most Welcome. 
 
Please let us know if you need any further assistance on this. 
 
Regards, 
Divya 


Loader.
Up arrow icon