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

Public Member Functions

 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, $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 48 of file FitBoundingBoxHorizontally.php.

Member Function Documentation

◆ create()

static create (   $page,
  $top 
)
static

Create destination object

Parameters
Zend_Pdf_Page | integer$pagePage object or page number
float$topTop edge of displayed page
Returns
Zend_Pdf_Destination_FitBoundingBoxHorizontally
Exceptions
Zend_Pdf_Exception

Definition at line 58 of file FitBoundingBoxHorizontally.php.

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  }
$page
Definition: pages.php:8

◆ getTopEdge()

getTopEdge ( )

Get top edge of the displayed page

Returns
float

Definition at line 82 of file FitBoundingBoxHorizontally.php.

83  {
84  return $this->_destinationArray->items[2]->value;
85  }

◆ setTopEdge()

setTopEdge (   $top)

Set top edge of the displayed page

Parameters
float$top
Returns
Zend_Pdf_Action_FitBoundingBoxHorizontally

Definition at line 93 of file FitBoundingBoxHorizontally.php.

94  {
95  $this->_destinationArray->items[2] = new Zend_Pdf_Element_Numeric($top);
96  return $this;
97  }

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