We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Save Annotations in individual FDF Files

Hi Team,

I am creating a sample application where the comments and annotations on a PDF made by one user, needs to be viewed in a list and can also be shared with other user on the same platform. So far I have extracted the annotations made on a PDF file as FDF file format but the problem is that it generates one FDF file for all the annotations wherein the User can select a singe annotation to be shared individually.

Is there a method by which for each annotation, a separate FDF file is created?

Else, can I extract individual annotations from a single FDF file? Is there any alternative method to achieve this is Syncfusion

Thanks for your help.

3 Replies

SL Sowmiya Loganathan Syncfusion Team August 29, 2019 01:11 PM UTC

Hi Pulkit, 

Thank you for contacting Syncfusion support.  

We can export individual annotation data from a single PDF document. Please refer the below code snippet for more details, 

//Loaded PDF document to export 
PdfLoadedDocument document = new PdfLoadedDocument(@"Input.pdf"); 
int i = 0; 
foreach (PdfLoadedPage loadedPage in document.Pages) 
    foreach (PdfLoadedAnnotation item in loadedPage.Annotations) 
        //Collection to export selected annotations 
        PdfExportAnnotationCollection collection = new PdfExportAnnotationCollection(); 
        //Add selected annotations into collection 
        //Export selected annotations into XFDF format 
        document.ExportAnnotations(@"Annotation" + i + ".fdf", AnnotationDataFormat.Fdf, collection); 

Please find the sample for the same from below link, 

Please try the above sample in your end and let us know if it satisfies your requirement.  

Sowmiya L 

PG Pulkit Goyal August 30, 2019 06:58 AM UTC

Hi Sowmiya,

Thanks a lot for your help on this. 

Much appreciate.

SK Surya Kumar Syncfusion Team September 2, 2019 10:08 AM UTC

Hi Pulkit, 

We are glad to know that we are helpful.  

Surya Kumar 

Live Chat Icon For mobile
Up arrow icon