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

Public Member Functions

 getLeftEdge ()
 
 setLeftEdge ($left)
 
 getTopEdge ()
 
 setTopEdge ($top)
 
 getZoomFactor ()
 
 setZoomFactor ($zoom)
 
- 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=null, $top=null, $zoom=null)
 
- 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 Zoom.php.

Member Function Documentation

◆ create()

static create (   $page,
  $left = null,
  $top = null,
  $zoom = null 
)
static

Create destination object

Parameters
Zend_Pdf_Page | integer$pagePage object or page number
float$leftLeft edge of displayed page
float$topTop edge of displayed page
float$zoomZoom factor
Returns
Zend_Pdf_Destination_Zoom
Exceptions
Zend_Pdf_Exception

Definition at line 61 of file Zoom.php.

62  {
63  $destinationArray = new Zend_Pdf_Element_Array();
64 
65  if ($page instanceof Zend_Pdf_Page) {
66  $destinationArray->items[] = $page->getPageDictionary();
67  } else if (is_integer($page)) {
68  $destinationArray->items[] = new Zend_Pdf_Element_Numeric($page);
69  } else {
70  #require_once 'Zend/Pdf/Exception.php';
71  throw new Zend_Pdf_Exception('Page entry must be a Zend_Pdf_Page object or a page number.');
72  }
73 
74  $destinationArray->items[] = new Zend_Pdf_Element_Name('XYZ');
75 
76  if ($left === null) {
77  $destinationArray->items[] = new Zend_Pdf_Element_Null();
78  } else {
79  $destinationArray->items[] = new Zend_Pdf_Element_Numeric($left);
80  }
81 
82  if ($top === null) {
83  $destinationArray->items[] = new Zend_Pdf_Element_Null();
84  } else {
85  $destinationArray->items[] = new Zend_Pdf_Element_Numeric($top);
86  }
87 
88  if ($zoom === null) {
89  $destinationArray->items[] = new Zend_Pdf_Element_Null();
90  } else {
91  $destinationArray->items[] = new Zend_Pdf_Element_Numeric($zoom);
92  }
93 
94  return new Zend_Pdf_Destination_Zoom($destinationArray);
95  }
$page
Definition: pages.php:8

◆ getLeftEdge()

getLeftEdge ( )

Get left edge of the displayed page (null means viewer application 'current value')

Returns
float

Definition at line 102 of file Zoom.php.

103  {
104  return $this->_destinationArray->items[2]->value;
105  }

◆ getTopEdge()

getTopEdge ( )

Get top edge of the displayed page (null means viewer application 'current value')

Returns
float

Definition at line 129 of file Zoom.php.

130  {
131  return $this->_destinationArray->items[3]->value;
132  }

◆ getZoomFactor()

getZoomFactor ( )

Get ZoomFactor of the displayed page (null or 0 means viewer application 'current value')

Returns
float

Definition at line 156 of file Zoom.php.

157  {
158  return $this->_destinationArray->items[4]->value;
159  }

◆ setLeftEdge()

setLeftEdge (   $left)

Set left edge of the displayed page (null means viewer application 'current value')

Parameters
float$left
Returns
Zend_Pdf_Action_Zoom

Definition at line 113 of file Zoom.php.

114  {
115  if ($left === null) {
116  $this->_destinationArray->items[2] = new Zend_Pdf_Element_Null();
117  } else {
118  $this->_destinationArray->items[2] = new Zend_Pdf_Element_Numeric($left);
119  }
120 
121  return $this;
122  }

◆ setTopEdge()

setTopEdge (   $top)

Set top edge of the displayed page (null means viewer application 'current viewer')

Parameters
float$top
Returns
Zend_Pdf_Action_Zoom

Definition at line 140 of file Zoom.php.

141  {
142  if ($top === null) {
143  $this->_destinationArray->items[3] = new Zend_Pdf_Element_Null();
144  } else {
145  $this->_destinationArray->items[3] = new Zend_Pdf_Element_Numeric($top);
146  }
147 
148  return $this;
149  }

◆ setZoomFactor()

setZoomFactor (   $zoom)

Set ZoomFactor of the displayed page (null or 0 means viewer application 'current viewer')

Parameters
float$zoom
Returns
Zend_Pdf_Action_Zoom

Definition at line 167 of file Zoom.php.

168  {
169  if ($zoom === null) {
170  $this->_destinationArray->items[4] = new Zend_Pdf_Element_Null();
171  } else {
172  $this->_destinationArray->items[4] = new Zend_Pdf_Element_Numeric($zoom);
173  }
174 
175  return $this;
176  }

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