本文整理汇总了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);
}
示例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);
}
示例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);
}
示例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);
}