Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.lowagie.text.pdf
Class PdfOutline

    java.lang.Object
      com.lowagie.text.pdf.PdfObject
          com.lowagie.text.pdf.PdfDictionary
              com.lowagie.text.pdf.PdfOutline

    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)

See Also:
  `PdfDictionary`

Field Summary
`private PdfAction` | `action` The `PdfAction` for this outline.
`private Color` | `color` Holds value of property color.
`private int` | `count` value of the Count-key
`private PdfDestination` | `destination` value of the Destination-key
`protected ArrayList` | `kids`
`private boolean` | `open` Holds value of property open.
`private PdfOutline` | `parent` value of the Parent-key
`private PdfIndirectReference` | `reference` the `PdfIndirectReference` of this object
`private int` | `style` Holds value of property style.
`private String` | `tag` Holds value of property tag.
`protected PdfWriter` | `writer`

Fields inherited from class com.lowagie.text.pdf.PdfDictionary
`CATALOG, FONT, hashMap, OUTLINES, PAGE, PAGES`

Fields inherited from class com.lowagie.text.pdf.PdfObject
`ARRAY, BOOLEAN, bytes, DICTIONARY, INDIRECT, indRef, NAME, NOTHING, NULL, NUMBER, STREAM, STRING, TEXT_PDFDOCENCODING, TEXT_UNICODE, type`

Constructor Summary
`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`.
`PdfOutline(PdfWriter writer)` Constructs a `PdfOutline`.

Method Summary
`void` | `addKid(PdfOutline outline)` Adds a kid to the outline
`Color` | `getColor()` Getter for property color.
`(package private) int` | `getCount()`
`ArrayList` | `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`.
`(package private) void` | `initOutline(PdfOutline parent, String title, boolean open)` Helper for the constructors.
`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.
`(package private) void` | `setCount(int count)`
`boolean` | `setDestinationPage(PdfIndirectReference pageReference)` Set the page of the `PdfDestination`-object.
`void` | `setIndirectReference(PdfIndirectReference reference)` Sets the indirect reference of this `PdfOutline`.
`void` | `setKids(ArrayList 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`.

Methods inherited from class com.lowagie.text.pdf.PdfDictionary
`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`

Methods inherited from class com.lowagie.text.pdf.PdfObject
`canBeInObjStm, getBytes, getIndRef, isArray, isBoolean, isDictionary, isIndirect, isName, isNull, isNumber, isStream, isString, length, setContent, setIndRef, type`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### reference

    private PdfIndirectReference reference

  the `PdfIndirectReference` of this object

### count

    private int count

  value of the Count-key

### parent

    private PdfOutline parent

  value of the Parent-key

### destination

    private PdfDestination destination

  value of the Destination-key

### action

    private PdfAction action

  The `PdfAction` for this outline.

### kids

    protected ArrayList kids

### writer

    protected PdfWriter writer

### tag

    private String tag

  Holds value of property tag.

### open

    private boolean open

  Holds value of property open.

### color

    private Color color

  Holds value of property color.

### style

    private int style

  Holds value of property style.

Constructor Detail

### PdfOutline

    PdfOutline(PdfWriter writer)

  Constructs a `PdfOutline`.

  This is the constructor for the `outlines object`.

  Parameters:
    `writer` - The PdfWriter you are adding the outline to

### PdfOutline

    public PdfOutline(PdfOutline parent,
                      PdfAction action,
                      String title)

  Constructs a `PdfOutline`.

  This is the constructor for an `outline entry`. The open mode is `true`.

  Parameters:
    `parent` - the parent of this outline item
    `action` - the `PdfAction` for this outline item
    `title` - the title of this outline item

### PdfOutline

    public PdfOutline(PdfOutline parent,
                      PdfAction action,
                      String title,
                      boolean open)

  Constructs a `PdfOutline`.

  This is the constructor for an `outline entry`.

  Parameters:
    `parent` - the parent of this outline item
    `action` - the `PdfAction` for this outline item
    `title` - the title of this outline item
    `open` - `true` if the children are visible

### PdfOutline

    public PdfOutline(PdfOutline parent,
                      PdfDestination destination,
                      String title)

  Constructs a `PdfOutline`.

  This is the constructor for an `outline entry`. The open mode is `true`.

  Parameters:
    `parent` - the parent of this outline item
    `destination` - the destination for this outline item
    `title` - the title of this outline item

### PdfOutline

    public PdfOutline(PdfOutline parent,
                      PdfDestination destination,
                      String title,
                      boolean open)

  Constructs a `PdfOutline`.

  This is the constructor for an `outline entry`.

  Parameters:
    `parent` - the parent of this outline item
    `destination` - the destination for this outline item
    `title` - the title of this outline item
    `open` - `true` if the children are visible

### PdfOutline

    public PdfOutline(PdfOutline parent,
                      PdfAction action,
                      PdfString title)

  Constructs a `PdfOutline`.

  This is the constructor for an `outline entry`. The open mode is `true`.

  Parameters:
    `parent` - the parent of this outline item
    `action` - the `PdfAction` for this outline item
    `title` - the title of this outline item

### PdfOutline

    public PdfOutline(PdfOutline parent,
                      PdfAction action,
                      PdfString title,
                      boolean open)

  Constructs a `PdfOutline`.

  This is the constructor for an `outline entry`.

  Parameters:
    `parent` - the parent of this outline item
    `action` - the `PdfAction` for this outline item
    `title` - the title of this outline item
    `open` - `true` if the children are visible

### PdfOutline

    public PdfOutline(PdfOutline parent,
                      PdfDestination destination,
                      PdfString title)

  Constructs a `PdfOutline`.

  This is the constructor for an `outline entry`. The open mode is `true`.

  Parameters:
    `parent` - the parent of this outline item
    `destination` - the destination for this outline item
    `title` - the title of this outline item

### PdfOutline

    public PdfOutline(PdfOutline parent,
                      PdfDestination destination,
                      PdfString title,
                      boolean open)

  Constructs a `PdfOutline`.

  This is the constructor for an `outline entry`.

  Parameters:
    `parent` - the parent of this outline item
    `destination` - the destination for this outline item
    `title` - the title of this outline item
    `open` - `true` if the children are visible

### PdfOutline

    public PdfOutline(PdfOutline parent,
                      PdfAction action,
                      Paragraph title)

  Constructs a `PdfOutline`.

  This is the constructor for an `outline entry`. The open mode is `true`.

  Parameters:
    `parent` - the parent of this outline item
    `action` - the `PdfAction` for this outline item
    `title` - the title of this outline item

### PdfOutline

    public PdfOutline(PdfOutline parent,
                      PdfAction action,
                      Paragraph title,
                      boolean open)

  Constructs a `PdfOutline`.

  This is the constructor for an `outline entry`.

  Parameters:
    `parent` - the parent of this outline item
    `action` - the `PdfAction` for this outline item
    `title` - the title of this outline item
    `open` - `true` if the children are visible

### PdfOutline

    public PdfOutline(PdfOutline parent,
                      PdfDestination destination,
                      Paragraph title)

  Constructs a `PdfOutline`.

  This is the constructor for an `outline entry`. The open mode is `true`.

  Parameters:
    `parent` - the parent of this outline item
    `destination` - the destination for this outline item
    `title` - the title of this outline item

### PdfOutline

    public PdfOutline(PdfOutline parent,
                      PdfDestination destination,
                      Paragraph title,
                      boolean open)

  Constructs a `PdfOutline`.

  This is the constructor for an `outline entry`.

  Parameters:
    `parent` - the parent of this outline item
    `destination` - the destination for this outline item
    `title` - the title of this outline item
    `open` - `true` if the children are visible

Method Detail

### initOutline

    void initOutline(PdfOutline parent,
                     String title,
                     boolean open)

  Helper for the constructors.

  Parameters:
    `parent` - the parent outline
    `title` - the title for this outline
    `open` - `true` if the children are visible

### setIndirectReference

    public void setIndirectReference(PdfIndirectReference reference)

  Sets the indirect reference of this `PdfOutline`.

  Parameters:
    `reference` - the `PdfIndirectReference` to this outline.

### indirectReference

    public PdfIndirectReference indirectReference()

  Gets the indirect reference of this `PdfOutline`.

  Returns:
    the `PdfIndirectReference` to this outline.

### parent

    public PdfOutline parent()

  Gets the parent of this `PdfOutline`.

  Returns:
    the `PdfOutline` that is the parent of this outline.

### setDestinationPage

    public boolean setDestinationPage(PdfIndirectReference pageReference)

  Set the page of the `PdfDestination`-object.

  Parameters:
    `pageReference` - indirect reference to the page
  Returns:
    `true` if this page was set as the `PdfDestination`-page.

### getPdfDestination

    public PdfDestination getPdfDestination()

  Gets the destination for this outline.

  Returns:
    the destination

### getCount

    int getCount()

### setCount

    void setCount(int count)

### level

    public int level()

  returns the level of this outline.

  Returns:
    a level

### toPdf

    public void toPdf(PdfWriter writer,
                      OutputStream os)
               throws IOException

  Returns the PDF representation of this `PdfOutline`.

  Overrides:
    `toPdf` in class `PdfDictionary`
  Parameters:
    `writer` - the encryption information
    `os` -
  Throws:
    `IOException`

### addKid

    public void addKid(PdfOutline outline)

  Adds a kid to the outline

  Parameters:
    `outline` -

### getKids

    public ArrayList getKids()

  Returns the kids of this outline

  Returns:
    an ArrayList with PdfOutlines

### setKids

    public void setKids(ArrayList kids)

  Sets the kids of this outline

  Parameters:
    `kids` -

### getTag

    public String getTag()

  Getter for property tag.

  Returns:
    Value of property tag.

### setTag

    public void setTag(String tag)

  Setter for property tag.

  Parameters:
    `tag` - New value of property tag.

### getTitle

    public String getTitle()

  Gets the title of this outline

  Returns:
    the title as a String

### setTitle

    public void setTitle(String title)

  Sets the title of this outline

  Parameters:
    `title` -

### isOpen

    public boolean isOpen()

  Getter for property open.

  Returns:
    Value of property open.

### setOpen

    public void setOpen(boolean open)

  Setter for property open.

  Parameters:
    `open` - New value of property open.

### getColor

    public Color getColor()

  Getter for property color.

  Returns:
    Value of property color.

### setColor

    public void setColor(Color color)

  Setter for property color.

  Parameters:
    `color` - New value of property color.

### getStyle

    public int getStyle()

  Getter for property style.

  Returns:
    Value of property style.

### setStyle

    public void setStyle(int style)

  Setter for property style.

  Parameters:
    `style` - New value of property style.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD