setasign\SetaPDF2\Core\Document\Page
Annotations Helper class for handling annotations of a page
File: /SetaPDF v2/Core/Document/Page/Annotations.php
Old class name (alias):
\SetaPDF_Core_Document_Page_Annotations
Class hierarchy
Summary
Constants
TAB_ORDER_ANNOTATIONS_ARRAY
Constant specifying the annotations array tab order
TAB_ORDER_COLUMN
Constant specifying the column tab order
TAB_ORDER_ROW
Constant specifying the row tab order
TAB_ORDER_STRUCTURE
Constant specifying the structure tab order
TAB_ORDER_WIDGET
Constant specifying the widget tab order
Properties
$_page
The page object
Methods
__construct()
add()
Adds an annotation to the page.
Parameters
- $annotation : \SetaPDF_Core_Document_Page_Annotation
Exceptions
getAll()
Get all annotations of this page.
Optionally the results can be filtered by the subtype parameter.
Parameters
- $subtype : string
See Annotation\Annotation::TYPE_* constants for possible values.
Exceptions
getArray()
Returns the Annots array if available or creates a new one.
Parameters
- $create : bool
Exceptions
getByName()
string $encoding = 'UTF-8'
Get an annotation by its name (NM entry)
Parameters
- $name : string
The name of the annotation.
- $encoding : string
Exceptions
Throws \setasign\SetaPDF2\Core\Document\ObjectNotFoundException
Throws \setasign\SetaPDF2\Core\Type\Exception
Throws \setasign\SetaPDF2\Core\Type\IndirectReference\Exception
remove()
Removes an annotation from the annotation array of the page.
Parameters
- $annotation : \SetaPDF_Core_Document_Page_Annotation
Exceptions
setTabOrder()
Set the tab order that shall be used for annotations on the page.
Parameters
- $tabOrder : ?string