Annoatation list

Annoations can be viewed as a list in this UI component

View annotations as list in Xamarin.Android

This tutorial only applies to Xamarin.Android. See Xamarin.iOS equivalent here .

The AnnotationDialogFragment displays a list of all annotations in a document being viewed by a PDFViewCtrl. The list also contains any comments that have been added to the annotations.

Apryse Docs Image

Show annotation dialog

To show an annotation dialog fragment in your activity, create a new instance of AnnotationDialogFragment by calling newInstance() and setting the PDFViewCtrl:

C#

1fun showBookmarksDialog(fragmentManager: FragmentManager, pdfViewCtrl: PDFViewCtrl): BookmarksDialogFragment {
2 var bookmarksDialog = pdftron.PDF.Dialog.BookmarksDialogFragment.NewInstance();
3 bookmarksDialog.SetPdfViewCtrl(pdfViewCtrl);
4 List<DialogFragmentTab> tabs = new List<DialogFragmentTab>();
5 var annotationsTab = new DialogFragmentTab(
6 Java.Lang.Class.FromType(typeof(AnnotationDialogFragment)), BookmarksTabLayout.TagTabAnnotation, null, "Annotations", "Bookmarks Dialog", null);
7 tabs.Add(annotationsTab);
8 bookmarksDialog.SetDialogFragmentTabs(tabs);
9 bookmarksDialog.SetStyle((int)DialogFragmentStyle.NoTitle, Resource.Style.PDFTronAppTheme);
10 bookmarksDialog.Show(fragmentManager, "bookmarks_dialog");
11 return bookmarksDialog;
12}

Listener

By calling setAnnotationDialogListener(AnnotationDialogListener), you can set a listener to be notified when an annotation item is clicked, or when document annotations are exported to a PDF doc when users click on the export floating action button.

Read-only

If the document has write access, users can delete existing annotations by long-pressing on the annotation. To specify whether the document is read-only call setReadOnly(boolean).

Did you find this helpful?

Trial setup questions?

Ask experts on Discord

Need other help?

Contact Support

Pricing or product questions?

Contact Sales
Display List of All PDF Annotations in Xamarin | Apryse documentation