> For the complete documentation index, see [llms.txt](https://docs.apryse.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.apryse.com/uwp/bookmarks/outline.md).

# Navigate PDF outline tree in UWP

Learn how to navigate and manipulate PDF outlines and bookmarks with a full code sample. Understand the structure of outline trees in PDF documents for interactive navigation. The Apryse uwp SDK strea

To navigate an outline tree and print its result.

{% tabs %}
{% tab title="C#" %}
{% code lineNumbers="true" %}

```csharp
void PrintIdent(Bookmark item)
{
  int ident = item.GetIdent() - 1;
  for (int i=0; i < ident; ++i) {
    Console.Write("  ");
  }
}
void PrintOutlineTree(Bookmark item)
{
  for (; item.IsValid(); item=item.GetNext()) {
    PrintIdent(item);
    Console.Write("{0:s}{1:s} ACTION -> ", (item.IsOpen() ? "- " : "+ "), item.GetTitle());
    if (item.HasChildren()) {
      PrintOutlineTree(item.GetFirstChild());
    }
  }
}
PDFDoc doc = new PDFDoc(filename);
Bookmark root = doc.GetFirstBookmark();
PrintOutlineTree(root);
```

{% endcode %}
{% endtab %}
{% endtabs %}

[Read, add, edit PDF outlines and bookmarks](/uwp/get-started/samples.md#bookmarks) Full code sample which illustrates how to read and edit existing outline items and create new bookmarks using the high-level API.

## About outline tree

A PDF document may display a document outline on the screen, allowing the user to navigate interactively from one part of the document to another. The outline consists of a tree-structured hierarchy of Bookmarks (sometimes called outline items), which serve as a "visual table of contents" to display the document's structure to the user.

Each Bookmark has a title that appears on screen, and an Action that specifies what happens when a user clicks on the Bookmark. The typical Action for a user-created Bookmark is to move to another location in the current document — although any Action can be specified.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.apryse.com/uwp/bookmarks/outline.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
