Magento Extensions Rating 2024
EXTENSIONS BY CATEGORY
B2B (Business-To-Business)
Blog
Customer
ERP (Enterprise Resource Planning)
Mega Menu
One Step Checkout
Order
POS (Point Of Sale)
Search
Shopping Cart
Sitemap
SEO
Social
Stock & Inventory Management
EXTENSIONS BY DEVELOPER
aheadWorks
Amasty
Boost My Shop
BSS Commerce
Magestore
MageWorx
Mirasvit
Templates Master
Wyomind
XTENTO
Magento 2 Documentation
Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
vendor
magento
zendframework1
library
Zend
Pdf
Destination
FitBoundingBoxHorizontally.php
Go to the documentation of this file.
1
<?php
25
#require_once 'Zend/Pdf/Element/Array.php';
26
#require_once 'Zend/Pdf/Element/Name.php';
27
#require_once 'Zend/Pdf/Element/Numeric.php';
28
29
31
#require_once 'Zend/Pdf/Destination/Explicit.php';
32
48
class
Zend_Pdf_Destination_FitBoundingBoxHorizontally
extends
Zend_Pdf_Destination_Explicit
49
{
58
public
static
function
create
(
$page
, $top)
59
{
60
$destinationArray =
new
Zend_Pdf_Element_Array
();
61
62
if
(
$page
instanceof
Zend_Pdf_Page
) {
63
$destinationArray->items[] =
$page
->getPageDictionary();
64
}
else
if
(is_integer(
$page
)) {
65
$destinationArray->items[] =
new
Zend_Pdf_Element_Numeric
(
$page
);
66
}
else
{
67
#require_once 'Zend/Pdf/Exception.php';
68
throw
new
Zend_Pdf_Exception
(
'Page entry must be a Zend_Pdf_Page object or a page number.'
);
69
}
70
71
$destinationArray->items[] =
new
Zend_Pdf_Element_Name
(
'FitBH'
);
72
$destinationArray->items[] =
new
Zend_Pdf_Element_Numeric
($top);
73
74
return
new
Zend_Pdf_Destination_FitBoundingBoxHorizontally
($destinationArray);
75
}
76
82
public
function
getTopEdge
()
83
{
84
return
$this->_destinationArray->items[2]->value;
85
}
86
93
public
function
setTopEdge
($top)
94
{
95
$this->_destinationArray->items[2] =
new
Zend_Pdf_Element_Numeric
($top);
96
return
$this;
97
}
98
}
Zend_Pdf_Page
Definition:
Page.php:44
Zend_Pdf_Destination_FitBoundingBoxHorizontally
Definition:
FitBoundingBoxHorizontally.php:48
Zend_Pdf_Destination_Explicit
Definition:
Explicit.php:39
Zend_Pdf_Destination_FitBoundingBoxHorizontally\getTopEdge
getTopEdge()
Definition:
FitBoundingBoxHorizontally.php:82
Zend_Pdf_Element_Array
Definition:
Array.php:35
Zend_Pdf_Element_Numeric
Definition:
Numeric.php:35
$page
$page
Definition:
pages.php:8
Zend_Pdf_Exception
Definition:
Exception.php:51
Zend_Pdf_Destination_FitBoundingBoxHorizontally\create
static create($page, $top)
Definition:
FitBoundingBoxHorizontally.php:58
Zend_Pdf_Element_Name
Definition:
Name.php:35
Zend_Pdf_Destination_FitBoundingBoxHorizontally\setTopEdge
setTopEdge($top)
Definition:
FitBoundingBoxHorizontally.php:93