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).
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. |
cOSDictionary | COSDictionary | Read | Returns the underlying COS dictionary. |
Methods
| Signature | Description |
|---|---|
OutlineCollection(outlinesDict: COSDictionary, 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> | |
getCOSDictionary() → COSDictionary | Returns the underlying COS dictionary. |