API to Convert external JSON annotation data to XFDF format

I have annotation data coming from external system in custom JSON format. I want to know if PDFTron has any APIs to create annotation data in XFDF format and merge it with PDF. Please share API details if any.

Hello Mohan,

At this time, we do not have API’s to create XFDF files directly. Instead, you could parse the custom JSON, and create a blank PDF with the annotations (and add pages accordingly).

You could then export these annotations to FDF and XFDF using the API. Please see the Annotation Test and FDF Test for example code.