diff -r 5b37998e522e -r 162c1de6545a web/lib/Zend/Pdf/Destination/FitBoundingBoxHorizontally.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/lib/Zend/Pdf/Destination/FitBoundingBoxHorizontally.php Fri Mar 11 15:05:35 2011 +0100 @@ -0,0 +1,98 @@ +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 or a page number.'); + } + + $destinationArray->items[] = new Zend_Pdf_Element_Name('FitBH'); + $destinationArray->items[] = new Zend_Pdf_Element_Numeric($top); + + return new Zend_Pdf_Destination_FitBoundingBoxHorizontally($destinationArray); + } + + /** + * Get top edge of the displayed page + * + * @return float + */ + public function getTopEdge() + { + return $this->_destinationArray->items[2]->value; + } + + /** + * Set top edge of the displayed page + * + * @param float $top + * @return Zend_Pdf_Action_FitBoundingBoxHorizontally + */ + public function setTopEdge($top) + { + $this->_destinationArray->items[2] = new Zend_Pdf_Element_Numeric($top); + return $this; + } +}