# How is exportAnnotations() command different from exportAnnotCommand() for exporting annotations?

**URL:** <https://pdfjs.community/t/how-is-exportannotations-command-different-from-exportannotcommand-for-exporting-annotations/879>\
**Category:** Technical Support\
**Created:** [July 9, 2021, 6:14am UTC](https://pdfjs.community/t/how-is-exportannotations-command-different-from-exportannotcommand-for-exporting-annotations/879 "2021-07-09T06:14:38Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![Logan](https://yyz1.discourse-cdn.com/flex031/user_avatar/pdfjs.community/logan/32/13_2.png) [@Logan](https://pdfjs.community/u/Logan)\
**Post date:** [July 12, 2021, 2:33pm UTC](https://pdfjs.community/t/how-is-exportannotations-command-different-from-exportannotcommand-for-exporting-annotations/879/3 "2021-07-12T14:33:57Z")

</div>

Hi there!

At the end of the day both of these functions do the same thing, export annotations as a string. The only difference is the format that the annotations are output in.

`exportAnnotations` exports annotations as an XFDF string, which is the standard format for annotations in PDFs.

`exportAnnotCommand` exports a proprietary format that we use internally for annotations.

I recommend using `exportAnnotations` since it matches the PDF Standard and is easy to parse/understand/use.

Thank you!  
Logan

---

_[View the full topic](https://pdfjs.community/t/how-is-exportannotations-command-different-from-exportannotcommand-for-exporting-annotations/879)._
