WidgetAnnotation

WidgetAnnotation

Overview

WidgetAnnotation is a class in Aspose.Pdf FOSS for Java. Inherits from: Annotation.

Widget annotation (ISO 32000-1:2008, §12.5.6.19, /Subtype /Widget).

Properties

NameTypeAccessDescription
fieldTypeStringReadReturns the field type (/FT), e.g.
fieldValueCOSBaseReadReturns the raw field value (/V).
fieldNameStringReadReturns the partial field name (/T).
highlightModeStringReadReturns the highlight mode (/H).
appearanceCharacteristicsCOSDictionaryReadReturns the appearance characteristics dictionary (/MK).
characteristicsorg.aspose.pdf.forms.AppearanceCharacteristicsReadReturns typed access to this widget’s appearance characteristics
(the {@code /MK} sub-dictionary).
widgetActionPdfActionReadReturns the action (/A) associated with this widget.
subtypeStringReadReturns the annotation subtype (e.g.
rectRectangleReadReturns the annotation rectangle defining its location on the page.
contentsStringReadReturns the text content of the annotation (/Contents entry).
nameStringReadReturns the unique name of the annotation (/NM entry).
modifiedStringReadReturns the date and time the annotation was last modified (/M entry).
flagsintReadReturns the annotation flags (/F entry) as a bitmask.
invisiblebooleanReadReturns whether the Invisible flag (bit 1) is set.
hiddenbooleanReadReturns whether the Hidden flag (bit 2) is set.
printbooleanReadReturns whether the Print flag (bit 3) is set.
noZoombooleanReadReturns whether the NoZoom flag (bit 4) is set.
noRotatebooleanReadReturns whether the NoRotate flag (bit 5) is set.
noViewbooleanReadReturns whether the NoView flag (bit 6) is set.
readOnlybooleanReadReturns whether the ReadOnly flag (bit 7) is set.
lockedbooleanReadReturns whether the Locked flag (bit 8) is set.
colorColorReadReturns the annotation color (/C entry).
borderBorderReadReturns the border of this annotation.
normalAppearanceStreamCOSStreamReadReturns the raw normal appearance stream (/AP /N) for this annotation
(ISO 32000-1:2008, §12.5.5).
normalAppearanceXFormReadReturns the normal appearance as an {@link XForm}, mirroring the C#
{@code Annotation.NormalAppearance} property.
opacitydoubleReadReturns the opacity of the annotation (0.0 = fully transparent, 1.0 = fully opaque).
zIndexintReadReturns the Z-index (drawing order) of this annotation.
actionsAnnotationActionCollectionReadReturns the annotation action collection (/AA entry).
pagePageReadReturns the page this annotation belongs to.
cOSDictionaryCOSDictionaryReadReturns the underlying COS dictionary for this annotation.

Methods

SignatureDescription
WidgetAnnotation(dict: COSDictionary, page: Page)Constructs a widget annotation from an existing COS dictionary.
WidgetAnnotation(page: Page, rect: Rectangle)Constructs a new widget annotation.
getFieldType()StringReturns the field type (/FT), e.g.
getFieldValue()COSBaseReturns the raw field value (/V).
getFieldName()StringReturns the partial field name (/T).
getHighlightMode()StringReturns the highlight mode (/H).
getAppearanceCharacteristics()COSDictionaryReturns the appearance characteristics dictionary (/MK).
getCharacteristics()org.aspose.pdf.forms.AppearanceCharacteristicsReturns typed access to this widget’s appearance characteristics
(the {@code /MK} sub-dictionary).
getWidgetAction()PdfActionReturns the action (/A) associated with this widget.
getSubtype()StringReturns the annotation subtype (e.g.
getRect()RectangleReturns the annotation rectangle defining its location on the page.
setRect(rect: Rectangle)Sets the annotation rectangle.
getContents()StringReturns the text content of the annotation (/Contents entry).
setContents(contents: String)Sets the text content of the annotation (/Contents entry).
getName()StringReturns the unique name of the annotation (/NM entry).
setName(name: String)Sets the unique name of the annotation (/NM entry).
getModified()StringReturns the date and time the annotation was last modified (/M entry).
setModified(date: String)Sets the date and time the annotation was last modified (/M entry).
getFlags()intReturns the annotation flags (/F entry) as a bitmask.
setFlags(flags: int)Sets the annotation flags (/F entry) as a bitmask.
isInvisible()booleanReturns whether the Invisible flag (bit 1) is set.
isHidden()booleanReturns whether the Hidden flag (bit 2) is set.
isPrint()booleanReturns whether the Print flag (bit 3) is set.
isNoZoom()booleanReturns whether the NoZoom flag (bit 4) is set.
isNoRotate()booleanReturns whether the NoRotate flag (bit 5) is set.
isNoView()booleanReturns whether the NoView flag (bit 6) is set.
isReadOnly()booleanReturns whether the ReadOnly flag (bit 7) is set.
isLocked()booleanReturns whether the Locked flag (bit 8) is set.
getColor()ColorReturns the annotation color (/C entry).
setColor(color: Color)Sets the annotation color (/C entry) as an RGB color array.
getBorder()BorderReturns the border of this annotation.
setBorder(border: Border)Sets the border of this annotation.
getNormalAppearanceStream()COSStreamReturns the raw normal appearance stream (/AP /N) for this annotation
(ISO 32000-1:2008, §12.5.5).
getNormalAppearance()XFormReturns the normal appearance as an {@link XForm}, mirroring the C#
{@code Annotation.NormalAppearance} property.
flatten()Flattens this annotation into the page content stream.
getOpacity()doubleReturns the opacity of the annotation (0.0 = fully transparent, 1.0 = fully opaque).
setOpacity(opacity: double)Sets the opacity of the annotation (0.0 = fully transparent, 1.0 = fully opaque).
getZIndex()intReturns the Z-index (drawing order) of this annotation.
setZIndex(zIndex: int)Sets the Z-index (drawing order) of this annotation.
getActions()AnnotationActionCollectionReturns the annotation action collection (/AA entry).
getPage()PageReturns the page this annotation belongs to.
setPage(page: Page)Sets the page this annotation belongs to.
getCOSDictionary()COSDictionaryReturns the underlying COS dictionary for this annotation.
fromDictionary(dict: COSDictionary, page: Page)AnnotationFactory method: creates a typed annotation from a COS dictionary based on its /Subtype.

See Also