Xamarin.Android Using Activity

Hi, is their any way to extracted the annotations as a separate xml string when using an Documentactivity to load the pdf document


Unfortunately, you cannot extract XFDF annotations when using DocumentActivity to load the PDF document. Instead of using DocumentActivity in this case, we recommend that you use Fragment instead as described here:

You can then get the PDFDoc (and extract the XFDF) using the following function calls:

  1. https://www.pdftron.com/api/android/tools/javadoc/reference/com/pdftron/pdf/controls/PdfViewCtrlTabHostFragment.html#getCurrentPdfViewCtrlFragment()
  2. https://www.pdftron.com/api/android/tools/javadoc/reference/com/pdftron/pdf/controls/PdfViewCtrlTabFragment.html#getPdfDoc()

Please let me know if this works for you, and if you have any further questions.