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

public const string Annotations::TAB_ORDER_ANNOTATIONS_ARRAY = 'A'

Constant specifying the annotations array tab order

TAB_ORDER_COLUMN

public const string Annotations::TAB_ORDER_COLUMN = 'C'

Constant specifying the column tab order

TAB_ORDER_ROW

public const string Annotations::TAB_ORDER_ROW = 'R'

Constant specifying the row tab order

TAB_ORDER_STRUCTURE

public const string Annotations::TAB_ORDER_STRUCTURE = 'S'

Constant specifying the structure tab order

TAB_ORDER_WIDGET

public const string Annotations::TAB_ORDER_WIDGET = 'W'

Constant specifying the widget tab order


Properties

$_page

The page object


Methods

__construct()

The constructor.

Parameters
$page : \SetaPDF_Core_Document_Page
 

cleanUp()

public Annotations::cleanUp (
void
): void

Release memory/resources.

getAll()

public Annotations::getAll (
string $subtype = null
): \SetaPDF_Core_Document_Page_Annotation[]

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

Throws \setasign\SetaPDF2\Core\Type\Exception

getArray()

public Annotations::getArray (
bool $create = false
): false|\SetaPDF_Core_Type_Array

Returns the Annots array if available or creates a new one.

Parameters
$create : bool
 
Exceptions

Throws \setasign\SetaPDF2\Core\Type\Exception

getByName()

public Annotations::getByName (
string $name,
string $encoding = 'UTF-8'
): bool|\SetaPDF_Core_Document_Page_Annotation

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

getPage()

Get the page.

getTabOrder()

public Annotations::getTabOrder (
void
): ?string

Get the tab order that shall be used for annotations on the page.

Exceptions

Throws \setasign\SetaPDF2\Core\Type\Exception

remove()

Removes an annotation from the annotation array of the page.

Parameters
$annotation : \SetaPDF_Core_Document_Page_Annotation
 
Exceptions

Throws \setasign\SetaPDF2\Core\Type\Exception

setTabOrder()

public Annotations::setTabOrder (
?string $tabOrder
): void

Set the tab order that shall be used for annotations on the page.

Parameters
$tabOrder : ?string
 
Exceptions

Throws \setasign\SetaPDF2\Core\Type\Exception