OutlineCollection
Overview
OutlineCollection is a class in Aspose.PDF FOSS for Java.
Inherits from: Iterable<OutlineItemCollection>.
Root outline collection — the /Outlines dictionary in the document catalog (ISO 32000-1:2008, §12.3.3).
This class provides 14 methods for working with OutlineCollection objects in Java programs.
Available methods include: OutlineCollection, add, clear, contains, delete, get, getCount, getFirst, getLast, getPdfDictionary, getVisibleCount, iterator.
All public members are accessible to any Java application after installing the Aspose.PDF FOSS for Java package.
Properties: count, first, last, pdfDictionary, visibleCount.
Properties
| Name | Type | Access | Description |
|---|---|---|---|
first | OutlineItemCollection | Read | Returns the first top-level outline item, or null if the collection is empty. |
last | OutlineItemCollection | Read | Returns the last top-level outline item, or null if the collection is empty. |
count | int | Read | Returns the number of top-level bookmarks. |
visibleCount | int | Read | Returns the total number of visible items at all levels. |
pdfDictionary | PdfDictionary | Read | Returns the underlying PDF dictionary. |
Methods
| Signature | Description |
|---|---|
OutlineCollection(outlinesDict: PdfDictionary, document: Document, parser: PDFParser) | Wraps an existing /Outlines dictionary. |
OutlineCollection(document: Document, parser: PDFParser) | Creates an empty outline collection (when document has no bookmarks). |
add(item: OutlineItemCollection) | Adds a top-level bookmark. |
get(index: int) → OutlineItemCollection | Returns the bookmark at the given 1-based index. |
getFirst() → OutlineItemCollection | Returns the first top-level outline item, or null if the collection is empty. |
getLast() → OutlineItemCollection | Returns the last top-level outline item, or null if the collection is empty. |
getCount() → int | Returns the number of top-level bookmarks. |
getVisibleCount() → int | Returns the total number of visible items at all levels. |
delete(index: int) | Removes a bookmark by 1-based index. |
clear() | Removes all bookmarks. |
delete(title: String) | Deletes the first outline item with the specified title. |
contains(item: OutlineItemCollection) → boolean | Checks whether this collection contains the specified item. |
iterator() → Iterator<OutlineItemCollection> | |
getPdfDictionary() → PdfDictionary | Returns the underlying PDF dictionary. |