new PdfBookmarkEntry()

Example

var aspose = aspose || {};
aspose.cells = require("aspose.cells");
var java = require("java");
var workbook = new aspose.cells.Workbook();
workbook.getWorksheets().add();
workbook.getWorksheets().add();
var cellInPage1 = workbook.getWorksheets().get(0).getCells().get("A1");
var cellInPage2 = workbook.getWorksheets().get(1).getCells().get("A1");
var cellInPage3 = workbook.getWorksheets().get(2).getCells().get("A1");
cellInPage1.putValue("page1");
cellInPage2.putValue("page2");
cellInPage3.putValue("page3");
var pbeRoot = new aspose.cells.PdfBookmarkEntry();
pbeRoot.setText("root");
pbeRoot.setDestination(cellInPage1);
var list = java.newInstanceSync("java.util.ArrayList");
pbeRoot.setSubEntry(list);
pbeRoot.setOpen(false);
var subPbe1 = new aspose.cells.PdfBookmarkEntry();
subPbe1.setText("section1");
subPbe1.setDestination(cellInPage2);
var subPbe2 = new aspose.cells.PdfBookmarkEntry();
subPbe2.setText("section2");
subPbe2.setDestination(cellInPage3);
pbeRoot.getSubEntry().add(subPbe1);
pbeRoot.getSubEntry().add(subPbe2);
var opts = new aspose.cells.PdfSaveOptions();
opts.setBookmark(pbeRoot);
workbook.save("Test.pdf", opts);

Methods

getDestination()

The cell to which the bookmark link.

getDestinationName()

Gets or sets name of destination. If destination name is set, the destination will be defined as a named destination with this name.

getSubEntry()

SubEntry of a bookmark.

getText()

Title of a bookmark.

isCollapse()

When this property is true, the bookmarkentry will collapse, otherwise it will expand.

isOpen()

When this property is true, the bookmarkentry will expand, otherwise it will collapse.

setCollapse()

When this property is true, the bookmarkentry will collapse, otherwise it will expand.

setDestination()

The cell to which the bookmark link.

setDestinationName()

Gets or sets name of destination. If destination name is set, the destination will be defined as a named destination with this name.

setOpen()

When this property is true, the bookmarkentry will expand, otherwise it will collapse.

setSubEntry()

SubEntry of a bookmark.

setText()

Title of a bookmark.