Some test text!

menu
search

Outline tree (Android)

There are two options to working with an outline tree. First is using a UI component that provides tools to set a bookmark or display the outline. Second is an API guide to programmatically read outline items.

Outline UI

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

The OutlineDialogFragment displays a document outline (containing PDF Bookmarks) that can be used to navigate the PDF document by selecting a bookmark item.

Outline dialog

linkShow outline dialog

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

var outlineDialog = OutlineDialogFragment.NewInstance();
outlineDialog.SetPdfViewCtrl(mPdfViewCtrl);
// Set a custom style for this fragment
outlineDialog.SetStyle((int)DialogFragmentStyle.NoTitle, Resource.Style.CustomAppTheme);
// Show the dialog
outlineDialog.Show(this.SupportFragmentManager, "outline_list_dialog");
outlineDialog.OutlineClicked += (sender, e) =>
{
    outlineDialog.Dismiss();
};

You can also set the current bookmark using setCurrentBookmark(Bookmark).

linkListener

You can set a listener to be notified when an item in an OutlineDialogFragment is clicked by calling setOutlineDialogListener(OutlineDialogListener).

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