Home  Products  Purchase  Downloads  Demos  Forums  Blogs  Ticket  Wiki  API  Corporate


com.aspose.cells
Class PdfBookmarkEntry

java.lang.Object
  extended by com.aspose.cells.PdfBookmarkEntry

public class PdfBookmarkEntry
extends java.lang.Object

PdfBookmarkEntry is an entry in pdf bookmark. code example:


   Workbook workbook = new Workbook();
   Worksheets worksheets = workbook.getWorksheets();
   worksheets.addSheet("1");
   worksheets.addSheet("2");
   worksheets.addSheet("3");
   Cell cellInPage1 = worksheets.getSheet(0).getCells().getCell("A1");
   Cell cellInPage2 = worksheets.getSheet(1).getCells().getCell("A1");
   Cell cellInPage3 = worksheets.getSheet(2).getCells().getCell("A1");
   cellInPage1.setValue("a");
   cellInPage2.setValue("b");
   cellInPage3.setValue("c");
   PdfBookmarkEntry pbeRoot = new PdfBookmarkEntry();
   pbeRoot.setText("root");
   pbeRoot.setDestination(cellInPage1);
   pbeRoot.setIsOpen(false);
   PdfBookmarkEntry subPbe1 = new PdfBookmarkEntry();
   subPbe1.setText("1");
   subPbe1.setDestination(cellInPage2);
   PdfBookmarkEntry subPbe2 = new PdfBookmarkEntry();
   subPbe2.setText("2");
   subPbe2.setDestination(cellInPage3);
   ArrayList subEntryList = new ArrayList();
   subEntryList.add(subPbe1);
   subEntryList.add(subPbe2);
   pbeRoot.setSubEntryList(subEntryList);
   workbook.getSaveOptions().setPdfBookmark(pbeRoot);
   workbook.save("Test.pdf");
 


Constructor Summary
PdfBookmarkEntry()
           
 
Method Summary
 Cell getDestination()
          get the cell to which the bookmark link
 int getPageNum()
          get the page number of destination cell
 java.util.ArrayList<PdfBookmarkEntry> getSubEntryList()
          get the sub entry array list
 java.lang.String getText()
          get title of a bookmark
 boolean isOpen()
          check whether bookmark is open
 void setDestination(Cell value)
          set the cell to which the bookmark link
 void setIsOpen(boolean value)
          set the bookmark open status
 void setSubEntryList(java.util.ArrayList<PdfBookmarkEntry> value)
          Set the sub entry array list of this bookmark
 void setText(java.lang.String value)
          set title of a bookmark
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PdfBookmarkEntry

public PdfBookmarkEntry()
Method Detail

getText

public java.lang.String getText()
get title of a bookmark

Returns:
bookmark title

setText

public void setText(java.lang.String value)
set title of a bookmark

Parameters:
value - title of bookmark

getDestination

public Cell getDestination()
get the cell to which the bookmark link

Returns:
the cell to which the bookmark link

setDestination

public void setDestination(Cell value)
set the cell to which the bookmark link

Parameters:
value - cell to which the bookmark link

setSubEntryList

public void setSubEntryList(java.util.ArrayList<PdfBookmarkEntry> value)
Set the sub entry array list of this bookmark

Parameters:
value - sub entry array list

getSubEntryList

public java.util.ArrayList<PdfBookmarkEntry> getSubEntryList()
get the sub entry array list

Returns:
sub entry array list

isOpen

public boolean isOpen()
check whether bookmark is open

Returns:
true if open, otherwise false

setIsOpen

public void setIsOpen(boolean value)
set the bookmark open status

Parameters:
value - open status

getPageNum

public int getPageNum()
get the page number of destination cell

Returns:
page number