I do have a case where I need to merge programatically XFDF annotations with existing PDF to generate a new PDF contains the original PDF with the XFDF annotations. I did find some solutions like iText here
but the issue is that it could only be used to fill Forms (FormField) not complex annotations like shapes such as square and so on. the only working solution I can find so far is Aspose here using PdfAnnotationEditor it does the exact job.
I'm looking for Adobe alternative solution if there's an API could do the job.
Datalogics PDF Java Toolkit (JT) is a publicly available version of an internal Adobe library. Adobe has partnered with Datalogics as our go-to-market partner. JT can import appearances but unlike iText and Aspose will also generate the appearances so that viewers that are not able to do so will still work.