Example #1
0
 /**
  * Create a new page
  *
  * Create a new page in the PDF document with the given width and height.
  * 
  * @param float $width 
  * @param float $height 
  * @return void
  */
 public function createPage($width, $height)
 {
     if ($this->document === null) {
         $this->document = new TCPDF('P', 'mm', array($width, $height), true, 'UTF-8');
         // We do this ourselves
         $this->document->SetAutoPageBreak(false);
         $this->document->setFont($this->fonts[$this->currentFont['name']][self::FONT_PLAIN], '', $this->currentFont['size']);
     }
     // Create a new page, and create a reference in the pages array
     $this->document->AddPage('P', array($width, $height));
     $this->pages[] = $this->document->getPage();
 }
Example #2
0
 /**
  * Add an internal link target
  *
  * Add an internal link to the current page. The last parameter
  * is the target identifier.
  * 
  * @param string $id 
  * @return void
  */
 public function addInternalLinkTarget($id)
 {
     $this->internalTargets[$id] = $this->document->getPage();
 }