Table of Contents

Class PdfOutline

Namespace
MiPdf
Assembly
MiPdf.dll

A bookmark (outline item). The document's root is Outlines; its children are the top-level bookmarks. Changes are written directly into the outline dictionaries.

public sealed class PdfOutline
Inheritance
PdfOutline
Inherited Members

Properties

Bold

Whether the title is shown in bold (bit 2 of /F).

public bool Bold { get; set; }

Property Value

bool

Children

The child bookmarks.

public IReadOnlyList<PdfOutline> Children { get; }

Property Value

IReadOnlyList<PdfOutline>

Color

Text color (/C), or null for the default (black). Outlines store RGB: gray is stored as equal RGB components, CMYK is converted with the naive formula (R = (1 − C)(1 − K), …). null removes the entry.

public PdfColor? Color { get; set; }

Property Value

PdfColor?

Dictionary

The outline item dictionary (or the outline root dictionary).

public PdfDictionary Dictionary { get; }

Property Value

PdfDictionary

IsOpen

Whether the children are shown expanded.

public bool IsOpen { get; set; }

Property Value

bool

IsRoot

True for the outline root (the dictionary has no /Parent entry).

public bool IsRoot { get; }

Property Value

bool

Italic

Whether the title is shown in italic (bit 1 of /F).

public bool Italic { get; set; }

Property Value

bool

PageNumber

The 1-based target page number, or null if the bookmark has no page destination.

public int? PageNumber { get; }

Property Value

int?

Reference

The indirect reference of the dictionary.

public PdfReference Reference { get; }

Property Value

PdfReference

Title

The text shown for the bookmark (/Title); empty if missing.

public string Title { get; set; }

Property Value

string

Methods

AddChild(string, PdfPage?, double?)

Adds a child bookmark pointing to page (optionally at a vertical position).

public PdfOutline AddChild(string title, PdfPage? page, double? top = null)

Parameters

title string
page PdfPage
top double?

Returns

PdfOutline

Remove()

Removes this bookmark (and its children) from its parent.

public void Remove()