SetaPDF_Core_Document_Page_Annotation_Underline Class representing a underline annotation

File: /SetaPDF v2/Core/Document/Page/Annotation/Underline.php

See PDF 32000-1:2008 - 12.5.6.10

Class hierarchy

Summary

Properties


Static Methods

_createAnnotationDictionary()

Creates a highlight annotation dictionary.

Parameters
$rect : SetaPDF_Core_DataStructure_Rectangle|array
 
$subtype : string
 
Exceptions

Throws InvalidArgumentException

createAnnotationDictionary()


Methods

addReply()

cleanUp()

Release memory/cycled references

createPopup()

public SetaPDF_Core_Document_Page_Annotation_Markup::createPopup (
[ int|float $offsetX = 30 [, int|float $offsetY = 20 [, int|float $width = 150 [, int|float $height = 100 ]]]]
): SetaPDF_Core_Document_Page_Annotation_Popup

Create a popup annotation object for this annotation.

If the x-offset value is less than zero the popup will be created at the left side of the main annotation. Otherwise on the right side. If the y-offset value is less than zero the popup will be create down below the main annotation. Otherwise above.

You need to re-add this new popup annotation to its origin annotation by passing it to the addPopup() method after assigning it to the page object.

Parameters
$offsetX : int|float
 
$offsetY : int|float
 
$width : int|float
 
$height : int|float
 

getAdditionalActions()

Gets the additional actions object instance for this annotation.

getAnnotationDictionary()

getAppearance()

public SetaPDF_Core_Document_Page_Annotation::getAppearance (
[ string $type = 'N' [, null|string $subType = null ]]
): null|SetaPDF_Core_XObject_Form

Get the annotation appearance stream.

Parameters
$type : string
 
$subType : null|string
 
Exceptions

Throws InvalidArgumentException

getColor()

Get the color of the annotation.

getContents()

public SetaPDF_Core_Document_Page_Annotation::getContents (
[ string $encoding = 'UTF-8' ]
): null|string

Get the contents of the annotation.

Parameters
$encoding : string
 

getCreationDate()

Get the creation date.

The date and time when the annotation was created.
Parameters
$asString : bool

Whether receive the value as a string (PDF date string) or as a SetaPDF_Core_DataStructure_Date instance.

See

getDictionary()

getHeight()

Get the height of the annotation.

getHiddenFlag()

Checks for the "Hidden" flag.

PDF 32000-1:2008 - Table 165: "If set, do not display or print the annotation or allow it to interact with the user, regardless of its annotation type or whether an annotation handler is available."

getInReplyTo()

Get the in reply to annotation (if available).

See

getIndirectObject()

Get the indirect object of this annotation.

Parameters
$document : SetaPDF_Core_Document
 

getInvisibleFlag()

Checks for the "Invisible" flag.

PDF 32000-1:2008 - Table 165: "If set, do not display the annotation if it does not belong to one of the standard annotation types and no annotation handler is available. If clear, display such an unknown annotation using an appearance stream specified by its appearance dictionary, if any"

getLockedContents()

Checks for the "LockedContents" flag.

PDF 32000-1:2008 - Table 165: "If set, do not allow the contents of the annotation to be modified by the user. This flag does not restrict deletion of the annotation or changes to other annotation properties, such as position and size."

getLockedFlag()

Checks the "Locked" flag.

PDF 32000-1:2008 - Table 165: "If set, do not allow the annotation to be deleted or its properties (including position and size) to be modified by the user. However, this flag does not restrict changes to the annotation’s contents, such as the value of a form field."

getModificationDate()

Get the modification date.

Parameters
$asString : bool
 

getName()

public SetaPDF_Core_Document_Page_Annotation::getName (
[ string $encoding = 'UTF-8' ]
): mixed|null

Get the name of the annotation.

Parameters
$encoding : string
 

getNoRotateFlag()

Checks fo the "NoRotate" flag.

PDF 32000-1:2008 - Table 165: "If set, do not rotate the annotation’s appearance to match the rotation of the page. The upper-left corner of the annotation rectangle shall remain in a fixed location on the page, regardless of the page rotation."

getNoViewFlag()

Checks for the "NoView" flag.

PDF 32000-1:2008 - Table 165: "If set, do not display the annotation on the screen or allow it to interact with the user. The annotation may be printed (depending on the setting of the Print flag) but should be considered hidden for purposes of on-screen display and user interaction."

getNoZoomFlag()

Checks fo the "NoZoom" flag.

PDF 32000-1:2008 - Table 165: "If set, do not scale the annotation’s appearance to match the magnification of the page. The location of the annotation on the page (defined by the upper- left corner of its annotation rectangle) shall remain fixed, regardless of the page magnification."

getOpacity()

Get the constant opacity value.

getPopup()

Get the associated popup object if available.

getPrintFlag()

Checks for the "Print" flag.

PDF 32000-1:2008 - Table 165: "If set, print the annotation when the page is printed. If clear, never print the annotation, regardless of whether it is displayed on the screen."

getQuadPoints()

Get the Quadpoints.

getReadOnlyFlag()

Checks the "ReadOnly" flag.

PDF 32000-1:2008 - Table 165: "If set, do not allow the annotation to interact with the user. The annotation may be displayed or printed (depending on the settings of the NoView and Print flags) but should not respond to mouse clicks or change its appearance in response to mouse motions.

This flag shall be ignored for widget annotations; its function is subsumed by the ReadOnly flag of the associated form field"

getRect()

Get the rectangle object of this annotation.

getReplies()

Get all annotations which refer this annotation as an reply.

Parameters
$annotations : SetaPDF_Core_Document_Page_Annotations
 

getSubject()

public SetaPDF_Core_Document_Page_Annotation_Markup::getSubject (
[ string $encoding = 'UTF-8' ]
): null|string

Get the subject.

Text representing a short description of the subject being addressed by the annotation.
Parameters
$encoding : string
 
See

getTextLabel()

public SetaPDF_Core_Document_Page_Annotation_Markup::getTextLabel (
[ string $encoding = 'UTF-8' ]
): null|string

Get the text label.

The text label that shall be displayed in the title bar of the annotation’s pop-up window when open and active. This entry shall identify the user who added the annotation.
Parameters
$encoding : string
 
See

getToggleNoView()

Checks for the "ToggleNoView" flag.

PDF 32000-1:2008 - Table 165: "If set, invert the interpretation of the NoView flag for certain events."

getType()

Get the action type specified in the S key.

getWidth()

Get the width of the annotation.

hasReplies()

Check whether this annotation has a reply or not.

Parameters
$annotations : SetaPDF_Core_Document_Page_Annotations
 

isAnnotationFlagSet()

Checks if a specific annotation flag is set.

Parameters
$flag : integer
 

isReplyTo()

Checks if this annotation is a reply to another annotation.

setAnnotationFlags()

public SetaPDF_Core_Document_Page_Annotation::setAnnotationFlags (
integer $flags [, boolean $set = true ]
): void

Sets an annotation flag.

Parameters
$flags : integer
 
$set : boolean

Set or unset

setAppearance()

public SetaPDF_Core_Document_Page_Annotation::setAppearance (
SetaPDF_Core_XObject_Form $xObject [, string $type = 'N' [, string|null $subState = null ]]
): void

Set the annotation appearance stream.

Parameters
$xObject : SetaPDF_Core_XObject_Form
 
$type : string
 
$subState : string|null
 

setColor()

public SetaPDF_Core_Document_Page_Annotation::setColor (
null|bool|int|float|string|array|SetaPDF_Core_DataStructure_Color $color
): void

Set the color of the annotation.

Parameters
$color : null|bool|int|float|string|array|SetaPDF_Core_DataStructure_Color
 

setContents()

public SetaPDF_Core_Document_Page_Annotation::setContents (
string|null $contents [, string $encoding = 'UTF-8' ]
): void

Set the contents of the annotation.

Parameters
$contents : string|null
 
$encoding : string
 

setCreationDate()

setHiddenFlag()

public SetaPDF_Core_Document_Page_Annotation::setHiddenFlag (
[ boolean $hidden = true ]
): void

Set the "Hidden" flag.

Parameters
$hidden : boolean
 
See

setInReplyTo()

Set the in reply to annotation object.

Parameters
$annotation : SetaPDF_Core_Document_Page_Annotation_Markup
 
Exceptions

Throws InvalidArgumentException

See

setIndirectObject()

Set the indirect object of this annotation.

Parameters
$indirectReference : SetaPDF_Core_Type_IndirectObjectInterface
 

setInvisibleFlag()

public SetaPDF_Core_Document_Page_Annotation::setInvisibleFlag (
[ boolean $invisible = true ]
): void

Set the "Invisible" flag.

Parameters
$invisible : boolean
 
See

setLocked()

public SetaPDF_Core_Document_Page_Annotation::setLocked (
[ boolean $locked = true ]
): void

Set the "Locked" flag.

Parameters
$locked : boolean
 
See

setLockedContents()

public SetaPDF_Core_Document_Page_Annotation::setLockedContents (
[ boolean $lockedContents = true ]
): void

Set the "LockedContents" flag.

Parameters
$lockedContents : boolean
 
See

setModificationDate()

Set the modification date.

Parameters
$date : SetaPDF_Core_DataStructure_Date|DateTime|string|bool

If true is passed, the current date and time will be used.

setName()

public SetaPDF_Core_Document_Page_Annotation::setName (
string|null $name [, string $encoding = 'UTF-8' ]
): void

Set the name of the annotation.

The annotation name, a text string uniquely identifying it among all the annotations on its page.

Parameters
$name : string|null
 
$encoding : string
 

setNoRotateFlag()

public SetaPDF_Core_Document_Page_Annotation::setNoRotateFlag (
[ boolean $noRotate = true ]
): void

Set the "NoRotate" flag.

Parameters
$noRotate : boolean
 
See

setNoViewFlag()

public SetaPDF_Core_Document_Page_Annotation::setNoViewFlag (
[ boolean $noView = true ]
): void

Set the "NoView" flag.

Parameters
$noView : boolean
 
See

setNoZoomFlag()

public SetaPDF_Core_Document_Page_Annotation::setNoZoomFlag (
[ boolean $noZoom = true ]
): void

Set the "NoZoom" flag.

Parameters
$noZoom : boolean
 
See

setOpacity()

Set the constant opacity value.

Parameters
$opacity : float
 

setPopup()

Set the pop-up annotation object.

Parameters
$annotation : SetaPDF_Core_Document_Page_Annotation_Popup
 
Exceptions

Throws InvalidArgumentException

setPrintFlag()

public SetaPDF_Core_Document_Page_Annotation::setPrintFlag (
[ boolean $print = true ]
): void

Set the "Print" flag.

Parameters
$print : boolean
 
See

setQuadPoints()

public SetaPDF_Core_Document_Page_Annotation_TextMarkup::setQuadPoints (
int|float|array $x1OrArray [, int|float $y1 = null [, int|float $x2 = null [, int|float $y2 = null [, int|float $x3 = null [, int|float $y3 = null [, int|float $x4 = null [, int|float $y4 = null ]]]]]]]
): void

Set the Quadpoints.

Parameters
$x1OrArray : int|float|array
 
$y1 : int|float
 
$x2 : int|float
 
$y2 : int|float
 
$x3 : int|float
 
$y3 : int|float
 
$x4 : int|float
 
$y4 : int|float
 

setReadOnlyFlag()

public SetaPDF_Core_Document_Page_Annotation::setReadOnlyFlag (
[ boolean $readOnly = true ]
): void

Set the "ReadOnly" flag.

Parameters
$readOnly : boolean
 
See

setRect()

setSubject()

public SetaPDF_Core_Document_Page_Annotation_Markup::setSubject (
string|null $subject [, string $encoding = 'UTF-8' ]
): void

Get the subject.

Parameters
$subject : string|null
 
$encoding : string
 
See

setTextLabel()

public SetaPDF_Core_Document_Page_Annotation_Markup::setTextLabel (
string|null $textLabel [, string $encoding = 'UTF-8' ]
): void

Set the text label.

Parameters
$textLabel : string|null
 
$encoding : string
 
See

setToggleNoView()

public SetaPDF_Core_Document_Page_Annotation::setToggleNoView (
[ boolean $toggleNoView = true ]
): void

Set the "ToggleNoView" flag.

Parameters
$toggleNoView : boolean
 
See

unsetAnnotationFlags()

Removes a field flag.

Parameters
$flags : integer