A markup annotation

An annotation associates an object such as a note, sound, or movie with a location on a page of a PDF document, or provides a way to interact with the user by means of the mouse and keyboard.

package Zend_Pdf
subpackage Annotation
copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
license New BSD License
inherited_from \Zend_Pdf_Annotation

 Methods

Annotation object constructor

__construct(\Zend_Pdf_Element $annotationDictionary) 
inherited_from \Zend_Pdf_Annotation::__construct()

Parameters

$annotationDictionary

Exceptions

\Zend_Pdf_Exception

Annotation object constructor

__construct(\Zend_Pdf_Element $annotationDictionary) 
Inherited

Parameters

$annotationDictionary

Exceptions

\Zend_Pdf_Exception

Create markup annotation object

create(float $x1, float $y1, float $x2, float $y2, string $text, string $subType, array $quadPoints) : \Zend_Pdf_Annotation_Markup
Static

Text markup annotations appear as highlights, underlines, strikeouts or jagged ("squiggly") underlines in the text of a document. When opened, they display a pop-up window containing the text of the associated note.

$subType parameter may contain Zend_Pdf_Annotation_Markup::SUBTYPE_HIGHLIGHT Zend_Pdf_Annotation_Markup::SUBTYPE_UNDERLINE Zend_Pdf_Annotation_Markup::SUBTYPE_SQUIGGLY Zend_Pdf_Annotation_Markup::SUBTYPE_STRIKEOUT for for a highlight, underline, squiggly-underline, or strikeout annotation, respectively.

$quadPoints is an array of 8xN numbers specifying the coordinates of N quadrilaterals default user space. Each quadrilateral encompasses a word or group of contiguous words in the text underlying the annotation. The coordinates for each quadrilateral are given in the order x1 y1 x2 y2 x3 y3 x4 y4 specifying the quadrilateral’s four vertices in counterclockwise order starting from left bottom corner. The text is oriented with respect to the edge connecting points (x1, y1) and (x2, y2).

Parameters

$x1

float

$y1

float

$x2

float

$y2

float

$text

string

$subType

string

$quadPoints

array

[x1 y1 x2 y2 x3 y3 x4 y4]

Exceptions

\Zend_Pdf_Exception

Returns

\Zend_Pdf_Annotation_Markup

Get bottom edge of the annotation rectangle.

getBottom() : float
Inherited

Returns

float

Get left edge of the annotation rectangle.

getLeft() : float
Inherited

Returns

float

Get right edge of the annotation rectangle.

getRight() : float
Inherited

Returns

float

Return text to be displayed for the annotation or, if this type of annotation does not display text, an alternate description of the annotation’s contents in human-readable form.

getText() : string
Inherited

Returns

string

Get top edge of the annotation rectangle.

getTop() : float
Inherited

Returns

float

Set bottom edge of the annotation rectangle.

setBottom(float $bottom) : \Zend_Pdf_Annotation
Inherited

Parameters

$bottom

float

Returns

\Zend_Pdf_Annotation

Set left edge of the annotation rectangle.

setLeft(float $left) : \Zend_Pdf_Annotation
Inherited

Parameters

$left

float

Returns

\Zend_Pdf_Annotation

Set right edge of the annotation rectangle.

setRight(float $right) : \Zend_Pdf_Annotation
Inherited

Parameters

$right

float

Returns

\Zend_Pdf_Annotation

Set text to be displayed for the annotation or, if this type of annotation does not display text, an alternate description of the annotation’s contents in human-readable form.

setText(string $text) : \Zend_Pdf_Annotation
Inherited

Parameters

$text

string

Returns

\Zend_Pdf_Annotation

Set top edge of the annotation rectangle.

setTop(float $top) : \Zend_Pdf_Annotation
Inherited

Parameters

$top

float

Returns

\Zend_Pdf_Annotation

 Properties

 

Annotation dictionary

$_annotationDictionary : \Zend_Pdf_Element_Dictionary | \Zend_Pdf_Element_Object | \Zend_Pdf_Element_Reference

Default

 Constants

 

Annotation subtypes

SUBTYPE_HIGHLIGHT = 'Highlight' 
 

SUBTYPE_SQUIGGLY

SUBTYPE_SQUIGGLY = 'Squiggly' 
 

SUBTYPE_STRIKEOUT

SUBTYPE_STRIKEOUT = 'StrikeOut' 
 

SUBTYPE_UNDERLINE

SUBTYPE_UNDERLINE = 'Underline'