本文整理匯總了PHP中Zend_Pdf_Page::drawLines方法的典型用法代碼示例。如果您正苦於以下問題:PHP Zend_Pdf_Page::drawLines方法的具體用法?PHP Zend_Pdf_Page::drawLines怎麽用?PHP Zend_Pdf_Page::drawLines使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Zend_Pdf_Page
的用法示例。
在下文中一共展示了Zend_Pdf_Page::drawLines方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: addReceiveInfo
/**
* Add Receive Info
*
* @param SimpleXMLElement $consignee
* @return Mage_Usa_Model_Shipping_Carrier_Dhl_Label_Pdf_PageBuilder
* @throws Zend_Pdf_Exception
*/
public function addReceiveInfo(SimpleXMLElement $consignee)
{
$this->_page->saveGS();
$this->_page->setFont($this->_fontNormal, 9);
$this->_page->drawText("To:", $this->_x(5), $this->_y(92));
$this->_page->drawText($consignee->CompanyName, $this->_x(20), $this->_y(90));
$y = $this->_page->drawLines($consignee->AddressLine, $this->_x(19), $this->_y(100), 50);
$this->_page->setFont($this->_fontBold, 11);
$cityInfo = implode(' ', array_filter(array($consignee->PostalCode, $consignee->City, $consignee->DivisionCode)));
$y = min($y - 3, 460);
$this->_page->drawLines(array($cityInfo, $consignee->CountryName), $this->_x(20), $y, 44);
$this->_page->setFont($this->_fontNormal, 6);
$this->_page->drawText('Contact:', $this->_x(260), $this->_y(90));
$y = $this->_page->drawLines(array($consignee->Contact->PersonName), $this->_x(283), $this->_y(98), 25, Mage_Usa_Model_Shipping_Carrier_Dhl_Label_Pdf_Page::ALIGN_RIGHT);
$phoneNumber = implode(' ', array_filter(array($consignee->Contact->PhoneNumber, $consignee->Contact->PhoneExtension)));
$this->_page->drawText($phoneNumber, $this->_x(283), $y, null, Mage_Usa_Model_Shipping_Carrier_Dhl_Label_Pdf_Page::ALIGN_RIGHT);
$this->_page->restoreGS();
return $this;
}