Class Bookmark

java.lang.Object
com.winnovative_software.Bookmark

public class Bookmark extends Object
This class represents a bookmark in the PDF document used to outline a section of the PDF document
  • Constructor Details

    • Bookmark

      public Bookmark(String text, ExplicitDestination destination)
      Constructs a bookmark object with the given text and destination that can be added to a PDF document object
      Parameters:
      text - the bookmark text
      destination - the bookmark destination
  • Method Details

    • text

      public String text()
      Gets the PDF bookmark text displayed in PDF document
      Returns:
      the PDF bookmark text displayed in PDF document
    • setText

      public void setText(String text)
      Sets the PDF bookmark text displayed in PDF document
      Parameters:
      text - the PDF bookmark text to set
    • color

      public RgbColor color()
      Gets the bookmark text color
      Returns:
      the bookmark text color
    • setColor

      public void setColor(RgbColor color)
      Sets the bookmark text color
      Parameters:
      color - the bookmark text color to set
    • style

      public int style()
      Gets the bookmark text style as a bitwise OR of flags from PdfBookmarkStyle class
      Returns:
      the bookmark text style
    • setStyle

      public void setStyle(int style)
      Sets the bookmark text style as a bitwise OR of flags from PdfBookmarkStyle class
      Parameters:
      style - the bookmark text style as a bitwise OR of flags from PdfBookmarkStyle class
    • destination

      public ExplicitDestination destination()
      Gets the bookmark destination
      Returns:
      the bookmark destination
    • setDestination

      public void setDestination(ExplicitDestination destination)
      Sets the bookmark destination
      Parameters:
      destination - the bookmark destination to set
    • parentBookmark

      public Bookmark parentBookmark()
      Gets the parent bookmark of this bookmark or null if the bookmark has no parent
      Returns:
      the parent bookmark