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 SummaryConstructorsConstructorDescriptionInstantiates a new text annotation.TextAnnotation(String contents) Instantiates a new text annotation.
- 
Method SummaryModifier and TypeMethodDescriptionGets the color of the annotation's 'Sticky Note'.Gets the contents of the 'sticky note' annotation.getIcon()Gets icon.doubleGets the opacity of the annotation (valid values are from 0.0 to 1.0).Gets subject.getTitle()Gets title.booleanisHidden()Hides the annotation from users.booleanThe annotation to be opened and readable by default, without user interaction.booleanIs allows the annotation to be printed when users print the PDF.booleanSets the annotation to be read only.booleanIs rotateable boolean.voidsetColorCode(String value) Sets the color of the annotation's 'Sticky Note'.voidsetContents(String value) Sets the contents of the 'sticky note' annotation.voidsetHidden(boolean value) Hides the annotation from users.voidsetIcon(AnnotationIcon value) Sets icon.voidsetOpacity(double value) Sets the opacity of the annotation (valid values are from 0.0 to 1.0).voidsetOpenByDefault(boolean value) Sets the annotation to be opened and readable by default, without user interaction.voidsetPrintable(boolean value) Sets allows the annotation to be printed when users print the PDF.voidsetReadOnly(boolean value) Sets the annotation to be read only.voidsetRotateable(boolean value) Sets rotateable.voidsetSubject(String value) Sets subject.voidSets title.toString()Returns aStringthat represents this annotation.
- 
Constructor Details- 
TextAnnotationpublic TextAnnotation()Instantiates a new text annotation.
- 
TextAnnotationInstantiates a new text annotation.- Parameters:
- contents- the contents of the 'sticky note' annotation
 
 
- 
- 
Method Details- 
getColorCodeGets the color of the annotation's 'Sticky Note'. Uses CSS '#ff66BB' hex color style.- Returns:
- the color code string.
 
- 
setColorCodeSets the color of the annotation's 'Sticky Note'. Uses CSS '#ff66BB' hex color style.- Parameters:
- value- the color code string.
 
- 
getContentsGets the contents of the 'sticky note' annotation.- Returns:
- the contents of the 'sticky note' annotation.
 
- 
setContentsSets the contents of the 'sticky note' annotation.- Parameters:
- value- the contents text.
 
- 
isHiddenpublic boolean isHidden()Hides the annotation from users.- Returns:
- the isHidden value.
 
- 
setHiddenpublic void setHidden(boolean value) Hides the annotation from users.- Parameters:
- value- the isHidden value.
 
- 
getOpacitypublic double getOpacity()Gets the opacity of the annotation (valid values are from 0.0 to 1.0).- Returns:
- the opacity of the annotation.
 
- 
setOpacitypublic 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).
 
- 
isOpenByDefaultpublic boolean isOpenByDefault()The annotation to be opened and readable by default, without user interaction.- Returns:
- the value of isOpenByDefault.
 
- 
setOpenByDefaultpublic void setOpenByDefault(boolean value) Sets the annotation to be opened and readable by default, without user interaction.- Parameters:
- value- the value of isOpenByDefault.
 
- 
isPrintablepublic boolean isPrintable()Is allows the annotation to be printed when users print the PDF.- Returns:
- the isPrintable value.
 
- 
setPrintablepublic void setPrintable(boolean value) Sets allows the annotation to be printed when users print the PDF.- Parameters:
- value- the isPrintable value.
 
- 
isReadOnlypublic boolean isReadOnly()Sets the annotation to be read only.- Returns:
- the isReadOnly value.
 
- 
setReadOnlypublic void setReadOnly(boolean value) Sets the annotation to be read only.- Parameters:
- value- the isReadOnly value.
 
- 
isRotateablepublic boolean isRotateable()Is rotateable boolean. Allows the annotation to be rotated. E.g. when the containing page os rotated.- Returns:
- the rotateable boolean.
 
- 
setRotateablepublic 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.
 
- 
toStringReturns aStringthat represents this annotation.
- 
getTitleGets title. The main title of the annotation as displayed in the header of the 'sticky note'.- Returns:
- the title
 
- 
setTitleSets title. The main title of the annotation as displayed in the header of the 'sticky note'.- Parameters:
- value- the value
 
- 
getSubjectGets subject. The subject of the annotation as displayed in the header of the 'sticky note'.- Returns:
- the subject.
 
- 
setSubjectSets subject. The subject of the annotation as displayed in the header of the 'sticky note'.- Parameters:
- value- the value.
 
- 
getIconGets icon. An icon to visually represent the 'sticky note' annotation.- Returns:
- the icon.
 
- 
setIconSets icon. An icon to visually represent the 'sticky note' annotation.- Parameters:
- value- the value.
 
 
-