Xamarin - iOS / Android Tracking Annotation changes

I have been looking for a way to track changes based on a session. After the annotation file is applied I would like to keep track of changes made in that session. Is there a way to do this?

Thanks in advance,

Hello, I’m Ron, an automated tech support bot :robot:

While you wait for one of our customer support representatives to get back to you, please check out some of these documentation pages:


Hi there,

You can keep track of annotation changes (add/modify/delete) with the collaboration system, which will generate XFDF command-strings for each change.

If you are only interested in the state of the document at the end of the session, then the entire collaboration system may be more than is needed.

Could you expand a bit on the use case and flow of a session in your product?

1 Like

I am trying to achieve a flow where I keep a list of annotation changes in a single session. Then when the session ends it exports the list of annotations made in that one session.

Is there a way to export annotations other than exporting them to an FDF. Is there way to only export a list of annotations I supply, rather than the entire file of annotations?

If you would like to only extract data for a list of annotations, you can use the following API on the PDFDoc class: https://www.pdftron.com/api/xamarinios/pdfnet/api/pdftron.PDF.PDFDoc.html#pdftron_PDF_PDFDoc_FDFExtract_System_Collections_ArrayList_

If you only need to extract the data for annotations added in a session, then you can use the API above. To determine if an annotation was added during the session you can compare the session’s start time to the annotation’s creation date, accessible with this API for Markup annotation types: https://www.pdftron.com/api/xamarinios/pdfnet/api/pdftron.PDF.Annots.Markup.html#pdftron_PDF_Annots_Markup_GetCreationDates

If you need to know which annotations were added, modified, or deleted as well then the collaboration system could be a better fit for your use case.

Is there a way to export annotations other than exporting them to an FDF.

The standard formats for exported/extracted annotations are FDF and XFDF, the latter being more common for use cases where the annotation data is stored in a database or similar.

Do you have an intended use in mind for the exported annotation data? How would it be used?