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


PHP Zend_Pdf_Element_Name::toString方法代碼示例

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


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

示例1: drawImage

 /**
  * Draw an image at the specified position on the page.
  *
  * @param Zend_Pdf_Image $image
  * @param float $x1
  * @param float $y1
  * @param float $x2
  * @param float $y2
  * @return Zend_Pdf_Page
  */
 public function drawImage(Zend_Pdf_Resource_Image $image, $x1, $y1, $x2, $y2)
 {
     $this->_addProcSet('PDF');
     $imageName = $this->_attachResource('XObject', $image);
     $imageNameObj = new Zend_Pdf_Element_Name($imageName);
     $x1Obj = new Zend_Pdf_Element_Numeric($x1);
     $y1Obj = new Zend_Pdf_Element_Numeric($y1);
     $widthObj = new Zend_Pdf_Element_Numeric($x2 - $x1);
     $heightObj = new Zend_Pdf_Element_Numeric($y2 - $y1);
     $this->_contents .= "q\n" . '1 0 0 1 ' . $x1Obj->toString() . ' ' . $y1Obj->toString() . " cm\n" . $widthObj->toString() . ' 0 0 ' . $heightObj->toString() . " 0 0 cm\n" . $imageNameObj->toString() . " Do\n" . "Q\n";
     return $this;
 }
開發者ID:chaimvaid,項目名稱:linet3,代碼行數:22,代碼來源:Page.php

示例2: testToString

 public function testToString()
 {
     $nameObj = new Zend_Pdf_Element_Name('MyName');
     $this->assertEquals($nameObj->toString(), '/MyName');
 }
開發者ID:crodriguezn,項目名稱:crossfit-milagro,代碼行數:5,代碼來源:NameTest.php

示例3: toString

 /**
  * Return object as string
  *
  * @param Zend_Pdf_Factory $factory
  * @return string
  */
 public function toString($factory = null)
 {
     $outStr = '<<';
     $lastNL = 0;
     foreach ($this->_items as $name => $element) {
         if (!is_object($element)) {
             // require_once 'Zend/Pdf/Exception.php';
             throw new Zend_Pdf_Exception('Wrong data');
         }
         if (strlen($outStr) - $lastNL > 128) {
             $outStr .= "\n";
             $lastNL = strlen($outStr);
         }
         $nameObj = new Zend_Pdf_Element_Name($name);
         $outStr .= $nameObj->toString($factory) . ' ' . $element->toString($factory) . ' ';
     }
     $outStr .= '>>';
     return $outStr;
 }
開發者ID:ngchie,項目名稱:system,代碼行數:25,代碼來源:Dictionary.php

示例4: toString

 /**
  * Return object as string
  *
  * @param Zend_Pdf_Factory $factory
  * @return string
  */
 public function toString($factory = null)
 {
     $outStr = '<<';
     $lastNL = 0;
     foreach ($this->_items as $name => $element) {
         if (strlen($outStr) - $lastNL > 128) {
             $outStr .= "\n";
             $lastNL = strlen($outStr);
         }
         $nameObj = new Zend_Pdf_Element_Name($name);
         $outStr .= $nameObj->toString($factory) . ' ' . $element->toString($factory) . ' ';
     }
     $outStr .= '>>';
     return $outStr;
 }
開發者ID:jorgenils,項目名稱:zend-framework,代碼行數:21,代碼來源:Dictionary.php


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