how to save annotations in xod file using c# code
I am using C# for saving annotations , but in the demo they have given a php file names annotationHandler.php I converted the code of php to C# but not working hence I seek to have a support on c# where i can save the annotations in the internal xfdf file of a xod file
We use the XFDF (XML) format for transferring and storing annotations. XFDF is part of the PDF standard.
By default, when you convert a PDF with annotations in it to XOD, there is an internal XFDF file in the XOD.
Also by default, in our WebViewer sample, when a XOD is loaded, it uses annotationHandler.php to check your server for a XFDF file, if one is returned that one is used, otherwise if none is returned, the original internal one is used.
So on your server side, in C#, you would typically store and retrieve XFDF files/strings from your database. You would not be extracting/merging XFDF and XOD, as that is all handled client side by WebViewer.
Please note there is a separate WebViewer forum.
Sir please give c# code or reference of any such code which will do the functionality of the annotationhandler.php , I have tried to convert it to C# nut not getting the desired result as i don’t know php that may be a reason
in the web viewer its showing that annotations save success but when i am refreshing the browser again same annotation is not getting loaded
The annotationHandler.php file, though it is in the /lib/html5 folder, is not actually part of WebViewer, and is provided mainly for demonstrative purposes. PHP was chosen as most servers support running PHP, and this is the simplest way to setup and run.
In the end the file is just handling POST and GET requests, and writing to disk. The top of the file contains a description of the functionality and suggests next steps.
We cannot provide other sample code, as then it becomes very dependent on your particular server setup (JBoss, IIS, WAMPP, XAMPP, etc), and often much more configuration.
Typically we see customers reading/writing the XFDF to their database (using the document_id and also a user_id (not included in sample)). Again, exact code would depend on your database technology.