All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.aspose.cells.PdfBookmarkEntry.html Maven / Gradle / Ivy

There is a newer version: 23.1
Show newest version





PdfBookmarkEntry




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. if Text property of current instance is null or "", current instance will be hidden and children will be inserted on current level.

Example:

Workbook workbook = new Workbook();
workbook.getWorksheets().add();
workbook.getWorksheets().add();
Cell cellInPage1 = workbook.getWorksheets().get(0).getCells().get("A1");
Cell cellInPage2 = workbook.getWorksheets().get(1).getCells().get("A1");
Cell cellInPage3 = workbook.getWorksheets().get(2).getCells().get("A1");
cellInPage1.putValue("page1");
cellInPage2.putValue("page2");
cellInPage3.putValue("page3");

PdfBookmarkEntry pbeRoot = new PdfBookmarkEntry();
pbeRoot.setText("root");
pbeRoot.setDestination(cellInPage1);
pbeRoot.setSubEntry(new ArrayList());
pbeRoot.setOpen(false);

PdfBookmarkEntry subPbe1 = new PdfBookmarkEntry();
subPbe1.setText("section1");
subPbe1.setDestination(cellInPage2);

PdfBookmarkEntry subPbe2 = new PdfBookmarkEntry();
subPbe2.setText("section2");
subPbe2.setDestination(cellInPage3);

pbeRoot.getSubEntry().add(subPbe1);
pbeRoot.getSubEntry().add(subPbe2);

PdfSaveOptions opts = new PdfSaveOptions();
opts.setBookmark(pbeRoot);
workbook.save("c:\\Test.pdf", opts);


Constructor Summary
PdfBookmarkEntry()
          
 
Property Getters/Setters Summary
CellgetDestination()
voidsetDestination(Cell)
           The cell to which the bookmark link.
java.lang.StringgetDestinationName()
voidsetDestinationName(java.lang.String)
           Gets or sets name of destination.
booleanisCollapse()
voidsetCollapse(boolean)
           When this property is true, the bookmarkentry will collapse, otherwise it will expand.
booleanisOpen()
voidsetOpen(boolean)
           When this property is true, the bookmarkentry will expand, otherwise it will collapse.
java.util.ArrayListgetSubEntry()
voidsetSubEntry(java.util.ArrayList)
           SubEntry of a bookmark.
java.lang.StringgetText()
voidsetText(java.lang.String)
           Title of a bookmark.
 

Constructor Detail

PdfBookmarkEntry

public PdfBookmarkEntry()

Property Getters/Setters Detail

getText/setText

public java.lang.String getText() / public void setText(java.lang.String value)
Title of a bookmark.

setText

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

getDestination/setDestination

public Cell getDestination() / public void setDestination(Cell value)
The cell to which the bookmark link.

setDestination

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

getDestinationName/setDestinationName

public java.lang.String getDestinationName() / public void setDestinationName(java.lang.String value)
Gets or sets name of destination. If destination name is set, the destination will be defined as a named destination with this name.

setDestinationName

public void setDestinationName(java.lang.String value)
Gets or sets name of destination. If destination name is set, the destination will be defined as a named destination with this name.

getSubEntry/setSubEntry

public java.util.ArrayList getSubEntry() / public void setSubEntry(java.util.ArrayList value)
SubEntry of a bookmark.

setSubEntry

public void setSubEntry(java.util.ArrayList value)
SubEntry of a bookmark.

isOpen/setOpen

public boolean isOpen() / public void setOpen(boolean value)
When this property is true, the bookmarkentry will expand, otherwise it will collapse.

setOpen

public void setOpen(boolean value)
When this property is true, the bookmarkentry will expand, otherwise it will collapse.

isCollapse/setCollapse

public boolean isCollapse() / public void setCollapse(boolean value)
When this property is true, the bookmarkentry will collapse, otherwise it will expand.

setCollapse

public void setCollapse(boolean value)
When this property is true, the bookmarkentry will collapse, otherwise it will expand.

See Also:
          Aspose.Cells Documentation - the home page for the Aspose.Cells Product Documentation.
          Aspose.Cells Support Forum - our preferred method of support.





© 2015 - 2024 Weber Informatics LLC | Privacy Policy