getType() == Zend_Pdf_Element::TYPE_NUMERIC || $page->getType() == Zend_Pdf_Element::TYPE_DICTIONARY) { // Page destination entry is a page number or page dictionary object $destinationArray->items[] = $page; } else { require_once 'Zend/Pdf/Exception.php'; throw new Zend_Pdf_Exception('Page entry must be a Zend_Pdf_Page object, page number or page dictionary reference.'); } } else if ($page instanceof Zend_Pdf_Page) { $destinationArray->items[] = $page->getPageDictionary(); } else if (is_integer($page)) { $destinationArray->items[] = new Zend_Pdf_Element_Numeric($page); } else { require_once 'Zend/Pdf/Exception.php'; throw new Zend_Pdf_Exception('Page entry must be a Zend_Pdf_Page object, page number or page dictionary reference.'); } $destinationArray->items[] = new Zend_Pdf_Element_Name('FitBV'); $destinationArray->items[] = new Zend_Pdf_Element_Numeric($left); return new Zend_Pdf_Destination_FitBoundingBoxVertically($destinationArray); } /** * Get left edge of the displayed page * * @return float */ public function getLeftEdge() { return $this->_destinationArray->items[2]->value; } /** * Set left edge of the displayed page * * @param float $left * @return Zend_Pdf_Action_FitBoundingBoxVertically */ public function setLeftEdge($left) { $this->_destinationArray->items[2] = new Zend_Pdf_Element_Numeric($left); return $this; } }