OutlineItemCollection
Overview
OutlineItemCollection is a class in Aspose.Pdf FOSS for Java.
Inherits from: Iterable<OutlineItemCollection>.
Represents a single bookmark (outline item) in the document outline tree (ISO 32000-1:2008, §12.3.3, Table 153).
Properties
| Name | Type | Access | Description |
|---|---|---|---|
title | String | Read | Returns the bookmark title. |
bold | boolean | Read | Returns whether the title is displayed bold. |
italic | boolean | Read | Returns whether the title is displayed italic. |
color | Color | Read | Returns the text color for this bookmark. |
destination | ExplicitDestination | Read | Returns the destination for this bookmark. |
level | int | Read | Returns the nesting depth of this outline item. |
pageDisplay | ExplicitDestination | Read | Returns the page display destination for this bookmark. |
pageDisplay_Zoom | double | Read | Returns the zoom factor of the current XYZ destination, or 0 if not an XYZ destination. |
first | OutlineItemCollection | Read | Returns the first child outline item, or null if there are no children. |
last | OutlineItemCollection | Read | Returns the last child outline item, or null if there are no children. |
next | OutlineItemCollection | Read | Returns the next sibling outline item in the linked list, or null. |
prev | OutlineItemCollection | Read | Returns the previous sibling outline item in the linked list, or null. |
action | PdfAction | Read | Returns the action for this bookmark. |
count | int | Read | Returns the number of direct children. |
visibleCount | int | Read | Returns the total visible count (children of open items, recursively). |
open | boolean | Read | Returns whether this item is open (children visible). |
cOSDictionary | COSDictionary | Read | Returns the underlying COS dictionary. |
Methods
| Signature | Description |
|---|---|
OutlineItemCollection(outlines: OutlineCollection) | Creates a new empty bookmark. |
getTitle() → String | Returns the bookmark title. |
setTitle(title: String) | Sets the bookmark title. |
getBold() → boolean | Returns whether the title is displayed bold. |
setBold(bold: boolean) | Sets bold display. |
getItalic() → boolean | Returns whether the title is displayed italic. |
setItalic(italic: boolean) | Sets italic display. |
getColor() → Color | Returns the text color for this bookmark. |
setColor(color: Color) | Sets the text color for this bookmark. |
getDestination() → ExplicitDestination | Returns the destination for this bookmark. |
setDestination(action: GoToAction) | Sets the destination from a GoToAction. |
setDestination(dest: ExplicitDestination) | Sets the destination (removes action if set). |
setDestination(dest: IAppointment) | Sets the destination from any {@link IAppointment} — accepts both |
| {@link ExplicitDestination} (serialized as a {@code /Dest} array) and | |
| {@link NamedDestination} (serialized as a {@code /Dest} byte string). | |
getLevel() → int | Returns the nesting depth of this outline item. |
setPageDisplay(dest: ExplicitDestination) | Sets the page display destination for this bookmark. |
getPageDisplay() → ExplicitDestination | Returns the page display destination for this bookmark. |
setPageDisplay_Zoom(zoom: double) | Sets the zoom factor for an XYZ destination. |
getPageDisplay_Zoom() → double | Returns the zoom factor of the current XYZ destination, or 0 if not an XYZ destination. |
getFirst() → OutlineItemCollection | Returns the first child outline item, or null if there are no children. |
getLast() → OutlineItemCollection | Returns the last child outline item, or null if there are no children. |
getNext() → OutlineItemCollection | Returns the next sibling outline item in the linked list, or null. |
getPrev() → OutlineItemCollection | Returns the previous sibling outline item in the linked list, or null. |
getAction() → PdfAction | Returns the action for this bookmark. |
setAction(action: PdfAction) | Sets the action (removes destination if set). |
add(child: OutlineItemCollection) | Adds a child bookmark. |
get(index: int) → OutlineItemCollection | Returns the child at the given 1-based index. |
getCount() → int | Returns the number of direct children. |
getVisibleCount() → int | Returns the total visible count (children of open items, recursively). |
isOpen() → boolean | Returns whether this item is open (children visible). |
setOpen(open: boolean) | Sets whether this item is open. |
delete(index: int) | Removes a child by 1-based index. |
delete() | Removes all child outline items from this bookmark. |
delete(title: String) | Deletes the first child item with the specified title (recursive). |
contains(item: OutlineItemCollection) → boolean | Checks whether this item or its descendants contain the specified item. |
iterator() → Iterator<OutlineItemCollection> | |
getCOSDictionary() → COSDictionary | Returns the underlying COS dictionary. |