public class PdfOutline extends Object implements Serializable
Modifier and Type | Field and Description |
---|---|
static int |
FLAG_BOLD
A flag for displaying the outline item’s text with bold font.
|
static int |
FLAG_ITALIC
A flag for displaying the outline item’s text with italic font.
|
Modifier and Type | Method and Description |
---|---|
void |
addAction(PdfAction action)
Adds PdfAction for the outline, A key.
|
void |
addDestination(PdfDestination destination)
Adds PdfDestination for the outline, Dest key.
|
PdfOutline |
addOutline(PdfOutline outline)
Adds an PdfOutline as a child to existing PdfOutline and put it to the end of the existing PdfOutline children list.
|
PdfOutline |
addOutline(String title)
Adds an PdfOutline as a child to existing PdfOutline and put it in the end of the existing PdfOutline children list.
|
PdfOutline |
addOutline(String title, int position)
Adds a new PdfOutline with specified parameters as a child to existing PdfOutline and put it to specified position in the existing PdfOutline children list.
|
List<PdfOutline> |
getAllChildren()
Gets list of children outlines.
|
PdfDictionary |
getContent()
Gets content dictionary.
|
PdfDestination |
getDestination()
Gets PdfDestination .
|
PdfOutline |
getParent()
Gets parent outline.
|
String |
getTitle()
Gets title of the outline.
|
void |
setColor(Color color)
Sets color for the outline entry’s text, C key.
|
void |
setOpen(boolean open)
Defines if the outline needs to be closed or not.
|
void |
setStyle(int style)
Sets text style for the outline entry’s text, F key.
|
void |
setTitle(String title)
Sets title of the outline with PdfEncodings.UNICODE_BIG encoding, Title key.
|
public static int FLAG_ITALIC
public static int FLAG_BOLD
public String getTitle()
public void setTitle(String title)
PdfEncodings.UNICODE_BIG
encoding, Title
key.
title
- String value.
public void setColor(Color color)
C
key.
color
- Color
public void setStyle(int style)
F
key.
style
- Could be either FLAG_BOLD
or FLAG_ITALIC
. Default value is 0
.
public PdfDictionary getContent()
PdfDictionary
.
public List<PdfOutline> getAllChildren()
PdfOutline
.
public PdfOutline getParent()
PdfOutline
.
public PdfDestination getDestination()
PdfDestination
.
PdfDestination
.
public void addDestination(PdfDestination destination)
PdfDestination
for the outline, Dest
key.
destination
- instance of PdfDestination
.
public void addAction(PdfAction action)
PdfAction
for the outline, A
key.
action
- instance of PdfAction
.
public void setOpen(boolean open)
open
- if false, the outline will be closed by default
public PdfOutline addOutline(String title, int position)
PdfOutline
with specified parameters as a child to existing PdfOutline
and put it to specified position in the existing PdfOutline
children list.
title
- an outline title
position
- a position in the current outline child List where a new outline should be added. If the position equals -1, then the outline will be put in the end of children list.
public PdfOutline addOutline(String title)
PdfOutline
as a child to existing PdfOutline
and put it in the end of the existing PdfOutline
children list.
title
- an outline title
public PdfOutline addOutline(PdfOutline outline)
PdfOutline
as a child to existing PdfOutline
and put it to the end of the existing PdfOutline
children list.
outline
- an outline to add.
Copyright © 1998–2020 iText Group NV. All rights reserved.