(mPDF >= 2.2)
Annotation – Add an Annotation to the document
void Annotation ( string $text [, float $x , float $y [, string $icon [, string $author [, string $subject [, float $opacity [, array $colarray [, mixed $popup ]]]]]]])
Adds an Annotation to the document. An annotation is like a Tooltip on a webpage. The Annotation marker, like those of “Sticky Notes” in Adobe Reader. When the reader passes the cursor over, it will display a popup text box.
The exact position on the page can be specified using $x and $y, or left to position automatically. If $x and $y are not specified, the Annotation will be inserted at the current position of writing in the document. The $x position (horizontal) can be overridden by the variable annotMargin, which can be used to force the Annotation marker to display in the right margin.
** SetUserRights was removed in mPDF 2.4 **
Annotations cannot be moved or deleted by the reader
This parameter specifies the text to appear in the popup text box
Sets the $x position of the (bottom left edge of the) Annotation marker, set in mm from the left of the page.
BLANK or omitted or 0 uses the current writing position on the page, unless overridden by $annotMargin.
Sets the $y position of the (bottom left edge of the) Annotation marker, set in mm from the top of the page. When Annotation markers are used within the text (annotMargin=FALSE), the marker is raised by the current lineheight to appear above the text.
BLANK or omitted or 0 uses the current writing position on the page.
Sets the appearance of the Annotation marker.
BLANK or omitted uses DEFAULT i.e. ‘Note’
Values (case sensitive)
This specifies the name of the Author which will appear at the top of the popup text box.
This specifies the text to appear in the Annotation properties.
Sets the opacity of the Annotation marker. Values must be greater than 0 and <= 1.
An array containing RGB color specification, which determines the colour of the Annotation marker background
DEFAULT array(255,255,0) i.e. Yellow
Specify whether to show the popup box for the annotation when the PDF document is opened, and optional specify its dimensions and/or position.
BLANK or omitted, 0 or “0” - the popup box is not shown.
Any other value forces the popup box to appear when the document is opened.
An array of 2 numbers will set the X and Y position in mm e.g. $popup=array(30, 30) will show a popup box with the top left corner 30mm from the top of the page and 30mm from the left of the page.
An array of 4 numbers will set the X and Y position and also the width and height in mm e.g. $popup=array(30, 30, 80, 50) will show a popup box with the top left corner 30mm from the top of the page and 30mm from the left of the page, a width of 80mm and a height of 50mm.
Note that the PDF Reader (e.g. Adobe Reader) may reposition the popup box as it pleases.
|2.2||The function was added.|
|2.4||Annotations cannot be moved or deleted|
|4.3||Parameter $popup was added|