Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Public Member Functions | Static Public Member Functions
Zend_Pdf_Annotation_Text Class Reference
Inheritance diagram for Zend_Pdf_Annotation_Text:
Zend_Pdf_Annotation

Public Member Functions

 __construct (Zend_Pdf_Element $annotationDictionary)
 
- Public Member Functions inherited from Zend_Pdf_Annotation
 getResource ()
 
 setBottom ($bottom)
 
 getBottom ()
 
 setTop ($top)
 
 getTop ()
 
 setRight ($right)
 
 getRight ()
 
 setLeft ($left)
 
 getLeft ()
 
 getText ()
 
 setText ($text)
 
 __construct (Zend_Pdf_Element $annotationDictionary)
 

Static Public Member Functions

static create ($x1, $y1, $x2, $y2, $text)
 
- Static Public Member Functions inherited from Zend_Pdf_Annotation
static load (Zend_Pdf_Element $resource)
 

Additional Inherited Members

- Protected Attributes inherited from Zend_Pdf_Annotation
 $_annotationDictionary
 

Detailed Description

Definition at line 43 of file Text.php.

Constructor & Destructor Documentation

◆ __construct()

__construct ( Zend_Pdf_Element  $annotationDictionary)

Annotation object constructor

Exceptions
Zend_Pdf_Exception

Definition at line 50 of file Text.php.

51  {
52  if ($annotationDictionary->getType() != Zend_Pdf_Element::TYPE_DICTIONARY) {
53  #require_once 'Zend/Pdf/Exception.php';
54  throw new Zend_Pdf_Exception('Annotation dictionary resource has to be a dictionary.');
55  }
56 
57  if ($annotationDictionary->Subtype === null ||
58  $annotationDictionary->Subtype->getType() != Zend_Pdf_Element::TYPE_NAME ||
59  $annotationDictionary->Subtype->value != 'Text') {
60  #require_once 'Zend/Pdf/Exception.php';
61  throw new Zend_Pdf_Exception('Subtype => Text entry is requires');
62  }
63 
64  parent::__construct($annotationDictionary);
65  }
const TYPE_NAME
Definition: Element.php:35
const TYPE_DICTIONARY
Definition: Element.php:37

Member Function Documentation

◆ create()

static create (   $x1,
  $y1,
  $x2,
  $y2,
  $text 
)
static

Create link annotation object

Parameters
float$x1
float$y1
float$x2
float$y2
string$text
Returns
Zend_Pdf_Annotation_Text

Definition at line 77 of file Text.php.

78  {
79  $annotationDictionary = new Zend_Pdf_Element_Dictionary();
80 
81  $annotationDictionary->Type = new Zend_Pdf_Element_Name('Annot');
82  $annotationDictionary->Subtype = new Zend_Pdf_Element_Name('Text');
83 
84  $rectangle = new Zend_Pdf_Element_Array();
85  $rectangle->items[] = new Zend_Pdf_Element_Numeric($x1);
86  $rectangle->items[] = new Zend_Pdf_Element_Numeric($y1);
87  $rectangle->items[] = new Zend_Pdf_Element_Numeric($x2);
88  $rectangle->items[] = new Zend_Pdf_Element_Numeric($y2);
89  $annotationDictionary->Rect = $rectangle;
90 
91  $annotationDictionary->Contents = new Zend_Pdf_Element_String($text);
92 
93  return new Zend_Pdf_Annotation_Text($annotationDictionary);
94  }
endifif( $block->getLastPageNum()>1)( 'Page') ?></strong >< ul class $text
Definition: pager.phtml:43

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