aspose.cells

Class PdfBookmarkEntry

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 = new cells\Workbook();
$workbook->getWorksheets()->add();
$workbook->getWorksheets()->add();
$cellInPage1 = $workbook->getWorksheets()->get(0)->getCells()->get("A1");
$cellInPage2 = $workbook->getWorksheets()->get(1)->getCells()->get("A1");
$cellInPage3 = $workbook->getWorksheets()->get(2)->getCells()->get("A1");
$cellInPage1->putValue("page1");
$cellInPage2->putValue("page2");
$cellInPage3->putValue("page3");

$pbeRoot = new cells\PdfBookmarkEntry();
$pbeRoot->setText("root");
$pbeRoot->setDestination($cellInPage1);
$list = new Java("java.util.ArrayList");
$pbeRoot->setSubEntry($list);
$pbeRoot->setOpen(false);

$subPbe1 = new cells\PdfBookmarkEntry();
$subPbe1->setText("section1");
$subPbe1->setDestination($cellInPage2);

$subPbe2 = new cells\PdfBookmarkEntry();
$subPbe2->setText("section2");
$subPbe2->setDestination($cellInPage3);

$pbeRoot->getSubEntry()->add($subPbe1);
$pbeRoot->getSubEntry()->add($subPbe2);

$opts = new cells\PdfSaveOptions();
$opts->setBookmark($pbeRoot);
$workbook->save("res.pdf", $opts);

Constructor Summary
 
Property Getters/Setters Summary
functiongetDestination()
function
           The cell to which the bookmark link.
functiongetDestinationName()
function
           Gets or sets name of destination.
functionisCollapse()
function
           When this property is true, the bookmarkentry will collapse, otherwise it will expand.
functionisOpen()
function
setOpen(value)
           When this property is true, the bookmarkentry will expand, otherwise it will collapse.
functiongetSubEntry()
function
           SubEntry of a bookmark.
functiongetText()
function
setText(value)
           Title of a bookmark.
 

    • Constructor Detail

      • PdfBookmarkEntry

        function PdfBookmarkEntry()
    • Property Getters/Setters Detail

      • getText/setText : String 

        function getText() / function setText(value)
        
        Title of a bookmark.
      • getDestination/setDestination : Cell 

        function getDestination() / function setDestination(value)
        
        The cell to which the bookmark link.
      • getDestinationName/setDestinationName : String 

        function getDestinationName() / function setDestinationName(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 : ArrayList 

        function getSubEntry() / function setSubEntry(value)
        
        SubEntry of a bookmark.
      • isOpen/setOpen : boolean 

        function isOpen() / function setOpen(value)
        
        When this property is true, the bookmarkentry will expand, otherwise it will collapse.
      • isCollapse/setCollapse : boolean 

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