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.
public sealed class PdfPageLabelCollection : IEnumerable<KeyValuePair<int, PdfPageLabel>>, IReadOnlyCollection<KeyValuePair<int, PdfPageLabel>>, IEnumerable- Implements
Properties
| Name | Description |
|---|---|
| Count | Gets the number of ranges. |
Methods
| Name | Description |
|---|---|
| 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() |
Clear()
PdfPageLabelCollection.csRemoves every range: the document has no page labels anymore.
public void Clear()GetEnumerator()
PdfPageLabelCollection.csReturns an enumerator over the ranges, by index of their first page.
public IEnumerator<KeyValuePair<int, PdfPageLabel>> GetEnumerator()Returns
IEnumerator<KeyValuePair<int, PdfPageLabel>> The enumerator.
GetLabel(int)
PdfPageLabelCollection.csRemove(int)
PdfPageLabelCollection.csSet(int, PdfPageLabel)
PdfPageLabelCollection.csStarts 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
pageIndexint- The index of the first page of the range, from 0.
labelPdfPageLabel- The label.