Ejemplo n.º 1
0
 /**
  * Add a table of contents.
  * To specifiy the position within the document, use the second param.
  * Every bookmark added via addBookmark() will be added.
  *
  * @param string $strTitle
  * @param int $intTargetPage
  *
  * @see class_pdf::addBookmark()
  * @return void
  */
 public function addTableOfContents($strTitle, $intTargetPage = 2)
 {
     // add a new page for TOC
     $this->objPdf->addTOCPage();
     $this->objPdf->selectColumn(0);
     $this->addMultiCell($strTitle);
     $this->objPdf->Ln();
     // add table of content at page 1
     $this->objPdf->addTOC($intTargetPage, $this->objPdf->getFontFamily(), ' . ', $strTitle);
     // end of TOC page
     $this->objPdf->endTOCPage();
 }