Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Public Member Functions | Static Public Member Functions
Zend_Pdf_Destination_FitRectangle Class Reference
Inheritance diagram for Zend_Pdf_Destination_FitRectangle:
Zend_Pdf_Destination_Explicit Zend_Pdf_Destination Zend_Pdf_Target

Public Member Functions

 getLeftEdge ()
 
 setLeftEdge ($left)
 
 getBottomEdge ()
 
 setBottomEdge ($bottom)
 
 getRightEdge ()
 
 setRightEdge ($right)
 
 getTopEdge ()
 
 setTopEdge ($top)
 
- Public Member Functions inherited from Zend_Pdf_Destination_Explicit
 __construct (Zend_Pdf_Element $destinationArray)
 
 isRemote ()
 
 getResource ()
 
- Public Member Functions inherited from Zend_Pdf_Target
 getResource ()
 

Static Public Member Functions

static create ($page, $left, $bottom, $right, $top)
 
- Static Public Member Functions inherited from Zend_Pdf_Destination
static load (Zend_Pdf_Element $resource)
 
- Static Public Member Functions inherited from Zend_Pdf_Target
static load (Zend_Pdf_Element $resource)
 

Additional Inherited Members

- Protected Attributes inherited from Zend_Pdf_Destination_Explicit
 $_destinationArray
 
 $_isRemote
 

Detailed Description

Definition at line 49 of file FitRectangle.php.

Member Function Documentation

◆ create()

static create (   $page,
  $left,
  $bottom,
  $right,
  $top 
)
static

Create destination object

Parameters
Zend_Pdf_Page | integer$pagePage object or page number
float$leftLeft edge of displayed page
float$bottomBottom edge of displayed page
float$rightRight edge of displayed page
float$topTop edge of displayed page
Returns
Zend_Pdf_Destination_FitRectangle
Exceptions
Zend_Pdf_Exception

Definition at line 62 of file FitRectangle.php.

63  {
64  $destinationArray = new Zend_Pdf_Element_Array();
65 
66  if ($page instanceof Zend_Pdf_Page) {
67  $destinationArray->items[] = $page->getPageDictionary();
68  } else if (is_integer($page)) {
69  $destinationArray->items[] = new Zend_Pdf_Element_Numeric($page);
70  } else {
71  #require_once 'Zend/Pdf/Exception.php';
72  throw new Zend_Pdf_Exception('Page entry must be a Zend_Pdf_Page object or a page number.');
73  }
74 
75  $destinationArray->items[] = new Zend_Pdf_Element_Name('FitR');
76  $destinationArray->items[] = new Zend_Pdf_Element_Numeric($left);
77  $destinationArray->items[] = new Zend_Pdf_Element_Numeric($bottom);
78  $destinationArray->items[] = new Zend_Pdf_Element_Numeric($right);
79  $destinationArray->items[] = new Zend_Pdf_Element_Numeric($top);
80 
81  return new Zend_Pdf_Destination_FitRectangle($destinationArray);
82  }
$page
Definition: pages.php:8

◆ getBottomEdge()

getBottomEdge ( )

Get bottom edge of the displayed page

Returns
float

Definition at line 111 of file FitRectangle.php.

112  {
113  return $this->_destinationArray->items[3]->value;
114  }

◆ getLeftEdge()

getLeftEdge ( )

Get left edge of the displayed page

Returns
float

Definition at line 89 of file FitRectangle.php.

90  {
91  return $this->_destinationArray->items[2]->value;
92  }

◆ getRightEdge()

getRightEdge ( )

Get right edge of the displayed page

Returns
float

Definition at line 133 of file FitRectangle.php.

134  {
135  return $this->_destinationArray->items[4]->value;
136  }

◆ getTopEdge()

getTopEdge ( )

Get top edge of the displayed page

Returns
float

Definition at line 155 of file FitRectangle.php.

156  {
157  return $this->_destinationArray->items[5]->value;
158  }

◆ setBottomEdge()

setBottomEdge (   $bottom)

Set bottom edge of the displayed page

Parameters
float$bottom
Returns
Zend_Pdf_Action_FitRectangle

Definition at line 122 of file FitRectangle.php.

123  {
124  $this->_destinationArray->items[3] = new Zend_Pdf_Element_Numeric($bottom);
125  return $this;
126  }

◆ setLeftEdge()

setLeftEdge (   $left)

Set left edge of the displayed page

Parameters
float$left
Returns
Zend_Pdf_Action_FitRectangle

Definition at line 100 of file FitRectangle.php.

101  {
102  $this->_destinationArray->items[2] = new Zend_Pdf_Element_Numeric($left);
103  return $this;
104  }

◆ setRightEdge()

setRightEdge (   $right)

Set right edge of the displayed page

Parameters
float$right
Returns
Zend_Pdf_Action_FitRectangle

Definition at line 144 of file FitRectangle.php.

145  {
146  $this->_destinationArray->items[4] = new Zend_Pdf_Element_Numeric($right);
147  return $this;
148  }

◆ setTopEdge()

setTopEdge (   $top)

Set top edge of the displayed page

Parameters
float$top
Returns
Zend_Pdf_Action_FitRectangle

Definition at line 166 of file FitRectangle.php.

167  {
168  $this->_destinationArray->items[5] = new Zend_Pdf_Element_Numeric($top);
169  return $this;
170  }

The documentation for this class was generated from the following file: