Hello,
Tell me please if it is possible to export/import annotations programmatically without dialog (ExportAnnots function). If not in ActiveX SDK (C#), maybe it is possible to do this in SDK PRO or Simple SDK?
Export\Import annotations
Moderators: PDF-XChange Support, Daniel - PDF-XChange, Chris - PDF-XChange, Sean - PDF-XChange, Vasyl - PDF-XChange, Ivan - Tracker Software, Stefan - PDF-XChange
-
- Site Admin
- Posts: 19913
- Joined: Mon Jan 12, 2009 8:07 am
Re: Export\Import annotations
Hello costea,
You should be able to achieve this using the exportAsFDF, exportAsXFDF JS methods to export the annotations data, and then use the respective importAnFDF, importAnXFDF methods to load the same annotation data in another file.
Regards,
Stefan
You should be able to achieve this using the exportAsFDF, exportAsXFDF JS methods to export the annotations data, and then use the respective importAnFDF, importAnXFDF methods to load the same annotation data in another file.
Regards,
Stefan
-
- User
- Posts: 14
- Joined: Mon Sep 09, 2013 6:51 am
Re: Export\Import annotations
Hello,
Thank you for the response. I have another question, is it possible to remove all annotations from a document from the code behind?
Thank you for the response. I have another question, is it possible to remove all annotations from a document from the code behind?
-
- Site Admin
- Posts: 19913
- Joined: Mon Jan 12, 2009 8:07 am
Re: Export\Import annotations
Hi costea,
Yes once again - using JS.
Here's a sample code that removes all FreeText annotations from the first page of a file:
Regards,
Stefan
Yes once again - using JS.
Here's a sample code that removes all FreeText annotations from the first page of a file:
Code: Select all
var annots = this.getAnnots({ nPage:0 });
for (var i = 0; i < annots.length; i++)
if (annots[i].type == "FreeText") annots[i].destroy();
Stefan
-
- User
- Posts: 14
- Joined: Mon Sep 09, 2013 6:51 am
Re: Export\Import annotations
Thank you Stefan, it works.
-
- Site Admin
- Posts: 19913
- Joined: Mon Jan 12, 2009 8:07 am
Re: Export\Import annotations
You are welcome costea! 
Cheers,
Stefan

Cheers,
Stefan