24 #require_once 'Zend/Pdf/Element.php'; 25 #require_once 'Zend/Pdf/Element/Array.php'; 26 #require_once 'Zend/Pdf/Element/Dictionary.php'; 27 #require_once 'Zend/Pdf/Element/Name.php'; 28 #require_once 'Zend/Pdf/Element/Numeric.php'; 29 #require_once 'Zend/Pdf/Element/String.php'; 33 #require_once 'Zend/Pdf/Annotation.php'; 61 #require_once 'Zend/Pdf/Exception.php'; 62 throw new Zend_Pdf_Exception(
'Annotation dictionary resource has to be a dictionary.');
65 if ($annotationDictionary->Subtype ===
null ||
67 !in_array( $annotationDictionary->Subtype->value,
68 array(self::SUBTYPE_HIGHLIGHT,
69 self::SUBTYPE_UNDERLINE,
70 self::SUBTYPE_SQUIGGLY,
71 self::SUBTYPE_STRIKEOUT) )) {
72 #require_once 'Zend/Pdf/Exception.php'; 73 throw new Zend_Pdf_Exception(
'Subtype => Markup entry is omitted or has wrong value.');
76 parent::__construct($annotationDictionary);
114 public static function create($x1, $y1, $x2, $y2,
$text, $subType, $quadPoints)
126 $annotationDictionary->Rect = $rectangle;
130 if (!is_array($quadPoints) || count($quadPoints) == 0 || count($quadPoints) % 8 != 0) {
131 #require_once 'Zend/Pdf/Exception.php'; 132 throw new Zend_Pdf_Exception(
'$quadPoints parameter must be an array of 8xN numbers');
135 foreach ($quadPoints as $quadPoint) {
138 $annotationDictionary->QuadPoints = $points;
static create($x1, $y1, $x2, $y2, $text, $subType, $quadPoints)
__construct(Zend_Pdf_Element $annotationDictionary)