Class TextAnnotation
java.lang.Object
com.ironsoftware.ironpdf.annotation.TextAnnotation
Defines a Sticky-Note style PDF annotation.
Annotation_Api.addTextAnnotation(InternalPdfDocument, TextAnnotation, int, int, int)
-
Constructor Summary
ConstructorDescriptionInstantiates a new text annotation.TextAnnotation
(String contents) Instantiates a new text annotation. -
Method Summary
Modifier and TypeMethodDescriptionGets the color of the annotation's 'Sticky Note'.Gets the contents of the 'sticky note' annotation.getIcon()
Gets icon.double
Gets the opacity of the annotation (valid values are from 0.0 to 1.0).Gets subject.getTitle()
Gets title.boolean
isHidden()
Hides the annotation from users.boolean
The annotation to be opened and readable by default, without user interaction.boolean
Is allows the annotation to be printed when users print the PDF.boolean
Sets the annotation to be read only.boolean
Is rotateable boolean.void
setColorCode
(String value) Sets the color of the annotation's 'Sticky Note'.void
setContents
(String value) Sets the contents of the 'sticky note' annotation.void
setHidden
(boolean value) Hides the annotation from users.void
setIcon
(AnnotationIcon value) Sets icon.void
setOpacity
(double value) Sets the opacity of the annotation (valid values are from 0.0 to 1.0).void
setOpenByDefault
(boolean value) Sets the annotation to be opened and readable by default, without user interaction.void
setPrintable
(boolean value) Sets allows the annotation to be printed when users print the PDF.void
setReadOnly
(boolean value) Sets the annotation to be read only.void
setRotateable
(boolean value) Sets rotateable.void
setSubject
(String value) Sets subject.void
Sets title.toString()
Returns aString
that represents this annotation.
-
Constructor Details
-
TextAnnotation
public TextAnnotation()Instantiates a new text annotation. -
TextAnnotation
Instantiates a new text annotation.- Parameters:
contents
- the contents of the 'sticky note' annotation
-
-
Method Details
-
getColorCode
Gets the color of the annotation's 'Sticky Note'. Uses CSS '#ff66BB' hex color style.- Returns:
- the color code string.
-
setColorCode
Sets the color of the annotation's 'Sticky Note'. Uses CSS '#ff66BB' hex color style.- Parameters:
value
- the color code string.
-
getContents
Gets the contents of the 'sticky note' annotation.- Returns:
- the contents of the 'sticky note' annotation.
-
setContents
Sets the contents of the 'sticky note' annotation.- Parameters:
value
- the contents text.
-
isHidden
public boolean isHidden()Hides the annotation from users.- Returns:
- the isHidden value.
-
setHidden
public void setHidden(boolean value) Hides the annotation from users.- Parameters:
value
- the isHidden value.
-
getOpacity
public double getOpacity()Gets the opacity of the annotation (valid values are from 0.0 to 1.0).- Returns:
- the opacity of the annotation.
-
setOpacity
public void setOpacity(double value) Sets the opacity of the annotation (valid values are from 0.0 to 1.0).- Parameters:
value
- the opacity of the annotation (valid values are from 0.0 to 1.0).
-
isOpenByDefault
public boolean isOpenByDefault()The annotation to be opened and readable by default, without user interaction.- Returns:
- the value of isOpenByDefault.
-
setOpenByDefault
public void setOpenByDefault(boolean value) Sets the annotation to be opened and readable by default, without user interaction.- Parameters:
value
- the value of isOpenByDefault.
-
isPrintable
public boolean isPrintable()Is allows the annotation to be printed when users print the PDF.- Returns:
- the isPrintable value.
-
setPrintable
public void setPrintable(boolean value) Sets allows the annotation to be printed when users print the PDF.- Parameters:
value
- the isPrintable value.
-
isReadOnly
public boolean isReadOnly()Sets the annotation to be read only.- Returns:
- the isReadOnly value.
-
setReadOnly
public void setReadOnly(boolean value) Sets the annotation to be read only.- Parameters:
value
- the isReadOnly value.
-
isRotateable
public boolean isRotateable()Is rotateable boolean. Allows the annotation to be rotated. E.g. when the containing page os rotated.- Returns:
- the rotateable boolean.
-
setRotateable
public void setRotateable(boolean value) Sets rotateable. Allows the annotation to be rotated. E.g. when the containing page os rotated.- Parameters:
value
- the rotateable value.
-
toString
Returns aString
that represents this annotation. -
getTitle
Gets title. The main title of the annotation as displayed in the header of the 'sticky note'.- Returns:
- the title
-
setTitle
Sets title. The main title of the annotation as displayed in the header of the 'sticky note'.- Parameters:
value
- the value
-
getSubject
Gets subject. The subject of the annotation as displayed in the header of the 'sticky note'.- Returns:
- the subject.
-
setSubject
Sets subject. The subject of the annotation as displayed in the header of the 'sticky note'.- Parameters:
value
- the value.
-
getIcon
Gets icon. An icon to visually represent the 'sticky note' annotation.- Returns:
- the icon.
-
setIcon
Sets icon. An icon to visually represent the 'sticky note' annotation.- Parameters:
value
- the value.
-