當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Zend_Pdf_Page::getPageDictionary方法代碼示例

本文整理匯總了PHP中Zend_Pdf_Page::getPageDictionary方法的典型用法代碼示例。如果您正苦於以下問題:PHP Zend_Pdf_Page::getPageDictionary方法的具體用法?PHP Zend_Pdf_Page::getPageDictionary怎麽用?PHP Zend_Pdf_Page::getPageDictionary使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Zend_Pdf_Page的用法示例。


在下文中一共展示了Zend_Pdf_Page::getPageDictionary方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: create

 /**
  * Create destination object
  *
  * @param Zend_Pdf_Page|integer $page  Page object or page number
  * @param float $left  Left edge of displayed page
  * @param float $top   Top edge of displayed page
  * @param float $zoom  Zoom factor
  * @return Zend_Pdf_Destination_Zoom
  * @throws Zend_Pdf_Exception
  */
 public static function create($page, $left = null, $top = null, $zoom = null)
 {
     $destinationArray = new Zend_Pdf_Element_Array();
     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 or a page number.');
         }
     }
     $destinationArray->items[] = new Zend_Pdf_Element_Name('XYZ');
     if ($left === null) {
         $destinationArray->items[] = new Zend_Pdf_Element_Null();
     } else {
         $destinationArray->items[] = new Zend_Pdf_Element_Numeric($left);
     }
     if ($top === null) {
         $destinationArray->items[] = new Zend_Pdf_Element_Null();
     } else {
         $destinationArray->items[] = new Zend_Pdf_Element_Numeric($top);
     }
     if ($zoom === null) {
         $destinationArray->items[] = new Zend_Pdf_Element_Null();
     } else {
         $destinationArray->items[] = new Zend_Pdf_Element_Numeric($zoom);
     }
     return new Zend_Pdf_Destination_Zoom($destinationArray);
 }
開發者ID:basdog22,項目名稱:Qool,代碼行數:41,代碼來源:Zoom.php

示例2: create

 /**
  * Create destination object
  *
  * @param Zend_Pdf_Page|integer $page  Page object or page number
  * @return Zend_Pdf_Destination_FitBoundingBox
  * @throws Zend_Pdf_Exception
  */
 public static function create($page)
 {
     $destinationArray = new Zend_Pdf_Element_Array();
     if ($page instanceof Zend_Pdf_Page) {
         $destinationArray->items[] = $page->getPageDictionary();
     } elseif (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('FitB');
     return new Zend_Pdf_Destination_FitBoundingBox($destinationArray);
 }
開發者ID:Cryde,項目名稱:sydney-core,代碼行數:21,代碼來源:FitBoundingBox.php

示例3: create

 /**
  * Create destination object
  *
  * @param Zend_Pdf_Page|integer $page  Page object or page number
  * @param float $left  Left edge of displayed page
  * @return Zend_Pdf_Destination_FitVertically
  * @throws Zend_Pdf_Exception
  */
 public static function create($page, $left)
 {
     $destinationArray = new Zend_Pdf_Element_Array();
     if ($page instanceof Zend_Pdf_Page) {
         $destinationArray->items[] = $page->getPageDictionary();
     } else {
         if (is_integer($page)) {
             $destinationArray->items[] = new Zend_Pdf_Element_Numeric($page);
         } else {
             //$1 'Zend/Pdf/Exception.php';
             throw new Zend_Pdf_Exception('Page entry must be a Zend_Pdf_Page object or page number.');
         }
     }
     $destinationArray->items[] = new Zend_Pdf_Element_Name('FitV');
     $destinationArray->items[] = new Zend_Pdf_Element_Numeric($left);
     return new Zend_Pdf_Destination_FitVertically($destinationArray);
 }
開發者ID:netconstructor,項目名稱:Centurion,代碼行數:25,代碼來源:FitVertically.php

示例4: create

 /**
  * Create destination object
  *
  * @param Zend_Pdf_Page|integer $page  Page object or page number
  * @param float $left    Left edge of displayed page
  * @param float $bottom  Bottom edge of displayed page
  * @param float $right   Right edge of displayed page
  * @param float $top     Top edge of displayed page
  * @return Zend_Pdf_Destination_FitRectangle
  * @throws Zend_Pdf_Exception
  */
 public static function create($page, $left, $bottom, $right, $top)
 {
     $destinationArray = new Zend_Pdf_Element_Array();
     if ($page instanceof Zend_Pdf_Page) {
         $destinationArray->items[] = $page->getPageDictionary();
     } elseif (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('FitR');
     $destinationArray->items[] = new Zend_Pdf_Element_Numeric($left);
     $destinationArray->items[] = new Zend_Pdf_Element_Numeric($bottom);
     $destinationArray->items[] = new Zend_Pdf_Element_Numeric($right);
     $destinationArray->items[] = new Zend_Pdf_Element_Numeric($top);
     return new Zend_Pdf_Destination_FitRectangle($destinationArray);
 }
開發者ID:Cryde,項目名稱:sydney-core,代碼行數:29,代碼來源:FitRectangle.php


注:本文中的Zend_Pdf_Page::getPageDictionary方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。