public class PdfOutline extends PdfDictionary
PdfOutline
is an object that represents a PDF outline entry.
An outline allows a user to access views of a document by name.
This object is described in the 'Portable Document Format Reference Manual version 1.3'
section 6.7 (page 104-106)
PdfDictionary
Modifier and Type | Field and Description |
---|---|
protected List<PdfOutline> |
kids |
protected PdfWriter |
writer |
Constructor and Description |
---|
PdfOutline(PdfOutline parent,
PdfAction action,
Paragraph title)
Constructs a
PdfOutline . |
PdfOutline(PdfOutline parent,
PdfAction action,
Paragraph title,
boolean open)
Constructs a
PdfOutline . |
PdfOutline(PdfOutline parent,
PdfAction action,
PdfString title)
Constructs a
PdfOutline . |
PdfOutline(PdfOutline parent,
PdfAction action,
PdfString title,
boolean open)
Constructs a
PdfOutline . |
PdfOutline(PdfOutline parent,
PdfAction action,
String title)
Constructs a
PdfOutline . |
PdfOutline(PdfOutline parent,
PdfAction action,
String title,
boolean open)
Constructs a
PdfOutline . |
PdfOutline(PdfOutline parent,
PdfDestination destination,
Paragraph title)
Constructs a
PdfOutline . |
PdfOutline(PdfOutline parent,
PdfDestination destination,
Paragraph title,
boolean open)
Constructs a
PdfOutline . |
PdfOutline(PdfOutline parent,
PdfDestination destination,
PdfString title)
Constructs a
PdfOutline . |
PdfOutline(PdfOutline parent,
PdfDestination destination,
PdfString title,
boolean open)
Constructs a
PdfOutline . |
PdfOutline(PdfOutline parent,
PdfDestination destination,
String title)
Constructs a
PdfOutline . |
PdfOutline(PdfOutline parent,
PdfDestination destination,
String title,
boolean open)
Constructs a
PdfOutline . |
Modifier and Type | Method and Description |
---|---|
void |
addKid(PdfOutline outline)
Adds a kid to the outline
|
Color |
getColor()
Getter for property color.
|
List<PdfOutline> |
getKids()
Returns the kids of this outline
|
PdfDestination |
getPdfDestination()
Gets the destination for this outline.
|
int |
getStyle()
Getter for property style.
|
String |
getTag()
Getter for property tag.
|
String |
getTitle()
Gets the title of this outline
|
PdfIndirectReference |
indirectReference()
Gets the indirect reference of this
PdfOutline . |
boolean |
isOpen()
Getter for property open.
|
int |
level()
returns the level of this outline.
|
PdfOutline |
parent()
Gets the parent of this
PdfOutline . |
void |
setColor(Color color)
Setter for property color.
|
boolean |
setDestinationPage(PdfIndirectReference pageReference)
Set the page of the
PdfDestination -object. |
void |
setIndirectReference(PdfIndirectReference reference)
Sets the indirect reference of this
PdfOutline . |
void |
setKids(List<PdfOutline> kids)
Sets the kids of this outline
|
void |
setOpen(boolean open)
Setter for property open.
|
void |
setStyle(int style)
Setter for property style.
|
void |
setTag(String tag)
Setter for property tag.
|
void |
setTitle(String title)
Sets the title of this outline
|
void |
toPdf(PdfWriter writer,
OutputStream os)
Returns the PDF representation of this
PdfOutline . |
contains, get, getAsArray, getAsBoolean, getAsDict, getAsIndirectObject, getAsName, getAsNumber, getAsStream, getAsString, getDirectObject, getKeys, isCatalog, isFont, isOutlineTree, isPage, isPages, merge, mergeDifferent, put, putAll, putEx, remove, size, toString
canBeInObjStm, getBytes, getIndRef, isArray, isBoolean, isDictionary, isIndirect, isName, isNull, isNumber, isStream, isString, length, setContent, setIndRef, type
protected List<PdfOutline> kids
protected PdfWriter writer
public PdfOutline(PdfOutline parent, PdfAction action, String title)
PdfOutline
.
This is the constructor for an outline entry
. The open mode is
true
.
parent
- the parent of this outline itemaction
- the PdfAction
for this outline itemtitle
- the title of this outline itempublic PdfOutline(PdfOutline parent, PdfAction action, String title, boolean open)
PdfOutline
.
This is the constructor for an outline entry
.
parent
- the parent of this outline itemaction
- the PdfAction
for this outline itemtitle
- the title of this outline itemopen
- true
if the children are visiblepublic PdfOutline(PdfOutline parent, PdfDestination destination, String title)
PdfOutline
.
This is the constructor for an outline entry
. The open mode is
true
.
parent
- the parent of this outline itemdestination
- the destination for this outline itemtitle
- the title of this outline itempublic PdfOutline(PdfOutline parent, PdfDestination destination, String title, boolean open)
PdfOutline
.
This is the constructor for an outline entry
.
parent
- the parent of this outline itemdestination
- the destination for this outline itemtitle
- the title of this outline itemopen
- true
if the children are visiblepublic PdfOutline(PdfOutline parent, PdfAction action, PdfString title)
PdfOutline
.
This is the constructor for an outline entry
. The open mode is
true
.
parent
- the parent of this outline itemaction
- the PdfAction
for this outline itemtitle
- the title of this outline itempublic PdfOutline(PdfOutline parent, PdfAction action, PdfString title, boolean open)
PdfOutline
.
This is the constructor for an outline entry
.
parent
- the parent of this outline itemaction
- the PdfAction
for this outline itemtitle
- the title of this outline itemopen
- true
if the children are visiblepublic PdfOutline(PdfOutline parent, PdfDestination destination, PdfString title)
PdfOutline
.
This is the constructor for an outline entry
. The open mode is
true
.
parent
- the parent of this outline itemdestination
- the destination for this outline itemtitle
- the title of this outline itempublic PdfOutline(PdfOutline parent, PdfDestination destination, PdfString title, boolean open)
PdfOutline
.
This is the constructor for an outline entry
.
parent
- the parent of this outline itemdestination
- the destination for this outline itemtitle
- the title of this outline itemopen
- true
if the children are visiblepublic PdfOutline(PdfOutline parent, PdfAction action, Paragraph title)
PdfOutline
.
This is the constructor for an outline entry
. The open mode is
true
.
parent
- the parent of this outline itemaction
- the PdfAction
for this outline itemtitle
- the title of this outline itempublic PdfOutline(PdfOutline parent, PdfAction action, Paragraph title, boolean open)
PdfOutline
.
This is the constructor for an outline entry
.
parent
- the parent of this outline itemaction
- the PdfAction
for this outline itemtitle
- the title of this outline itemopen
- true
if the children are visiblepublic PdfOutline(PdfOutline parent, PdfDestination destination, Paragraph title)
PdfOutline
.
This is the constructor for an outline entry
. The open mode is
true
.
parent
- the parent of this outline itemdestination
- the destination for this outline itemtitle
- the title of this outline itempublic PdfOutline(PdfOutline parent, PdfDestination destination, Paragraph title, boolean open)
PdfOutline
.
This is the constructor for an outline entry
.
parent
- the parent of this outline itemdestination
- the destination for this outline itemtitle
- the title of this outline itemopen
- true
if the children are visiblepublic void setIndirectReference(PdfIndirectReference reference)
PdfOutline
.reference
- the PdfIndirectReference
to this outline.public PdfIndirectReference indirectReference()
PdfOutline
.PdfIndirectReference
to this outline.public PdfOutline parent()
PdfOutline
.PdfOutline
that is the parent of this outline.public boolean setDestinationPage(PdfIndirectReference pageReference)
PdfDestination
-object.pageReference
- indirect reference to the pagetrue
if this page was set as the PdfDestination
-page.public PdfDestination getPdfDestination()
public int level()
public void toPdf(PdfWriter writer, OutputStream os) throws IOException
PdfOutline
.toPdf
in class PdfDictionary
writer
- the encryption informationos
- IOException
public void addKid(PdfOutline outline)
outline
- public List<PdfOutline> getKids()
public void setKids(List<PdfOutline> kids)
kids
- public String getTag()
public void setTag(String tag)
tag
- New value of property tag.public String getTitle()
public void setTitle(String title)
title
- public boolean isOpen()
public void setOpen(boolean open)
open
- New value of property open.public Color getColor()
public void setColor(Color color)
color
- New value of property color.public int getStyle()
public void setStyle(int style)
style
- New value of property style.Copyright © 2020. All rights reserved.