PdfPageLabelCollection Class

The page labels of a document (ISO 32000-2, 12.4.2): the /PageLabels number tree of the catalog, whose keys are the indexes of the first pages of the ranges. The changes are written to the catalog at once.

Implements

Properties

NameDescription
CountGets the number of ranges.

Gets the number of ranges.

public int Count { get; }

Property value

int

Methods

NameDescription
Clear()Removes every range: the document has no page labels anymore.
GetEnumerator()Returns an enumerator over the ranges, by index of their first page.
GetLabel(int)Gets the label of a page: the label of the range it is in, or null when the document has no page labels (viewers then show the page number).
Remove(int)Removes the range that starts at a page.
Set(int, PdfPageLabel)Starts a range of pages: the page and the pages after it, until the next range, are labelled by label.
System.Collections.IEnumerable.GetEnumerator()

Removes every range: the document has no page labels anymore.

public void Clear()

Returns an enumerator over the ranges, by index of their first page.

public IEnumerator<KeyValuePair<int, PdfPageLabel>> GetEnumerator()

Gets the label of a page: the label of the range it is in, or null when the document has no page labels (viewers then show the page number).

public string? GetLabel(int pageIndex)

Parameters

pageIndex int
The index of the page, from 0.

Returns

string? The label.

Removes the range that starts at a page.

public bool Remove(int pageIndex)

Parameters

pageIndex int
The index of the first page of the range.

Returns

bool true when there was a range.

Set(int, PdfPageLabel)

PdfPageLabelCollection.cs

Starts a range of pages: the page and the pages after it, until the next range, are labelled by label.

public void Set(int pageIndex, PdfPageLabel label)

Parameters

pageIndex int
The index of the first page of the range, from 0.
label PdfPageLabel
The label.

System.Collections.IEnumerable.GetEnumerator()

PdfPageLabelCollection.cs
IEnumerator IEnumerable.GetEnumerator()

No documentation is available.