Some test text!

menu
search
Annotation listkeyboard_arrow_down

Annoatation list

Annoations can be viewed as a list in this UI component

Annotation list

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.

Annotation dialog

linkShow annotation dialog

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

var annotationDialogFragment = AnnotationDialogFragment.NewInstance();
annotationDialogFragment.SetPdfViewCtrl(mPdfViewCtrl);
annotationDialogFragment.SetStyle((int)DialogFragmentStyle.NoTitle, Resource.Style.CustomAppTheme);
annotationDialogFragment.Show(this.SupportFragmentManager, "annotation_list_dialog");
annotationDialogFragment.AnnotationClicked += (sender, e) =>
{
    Console.WriteLine("AnnotationClicked on page: " + e.PageNum);
    annotationDialogFragment.Dismiss();
};
annotationDialogFragment.ExportAnnotations += (sender, e) =>
{
    Console.WriteLine("ExportAnnotations");
    annotationDialogFragment.Dismiss();
};

linkListener

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.

linkRead-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).

Get the answers you need: Support

close

Free Trial

Get unlimited trial usage of PDFTron SDK to bring accurate, reliable, and fast document processing capabilities to any application or workflow.

Select a platform to get started with your free trial.

Unlimited usage. No email address required.

PDFTron Receives USD$71 Million Growth Investment Led By Silversmith Capital Partners

Learn more
close