Class TextAnnotation
- java.lang.Object
- 
- com.ironsoftware.ironpdf.annotation.TextAnnotation
 
- 
 public final class TextAnnotation extends Object Defines a Sticky-Note style PDF annotation.Annotation_Api.addTextAnnotation(InternalPdfDocument, TextAnnotation)
- 
- 
Constructor SummaryConstructors Constructor Description TextAnnotation()Instantiates a new text annotation.TextAnnotation(String contents)Instantiates a new text annotation.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetAnnotationIndex()Gets index of the annotation on a page.StringgetColorCode()Gets the color of the annotation's 'Sticky Note'.StringgetContents()Gets the contents of the 'sticky note' annotation.intgetHeight()Gets the height of your annotation's icon and interactive area in pixelsAnnotationIcongetIcon()Gets icon.doublegetOpacity()Gets the opacity of the annotation (valid values are from 0.0 to 1.0).intgetPageIndex()Gets index of the page to add the annotation.StringgetSubject()Gets subject.StringgetTitle()Gets title.intgetWidth()Gets the width of your annotation's icon and interactive area in pixelsintgetX()Gets the horizontal X position of the annotation on your page in pixelsintgetY()Gets the vertical Y position of the annotation on your page in pixels.booleanisHidden()Hides the annotation from users.booleanisOpenByDefault()The annotation to be opened and readable by default, without user interaction.booleanisPrintable()Is allows the annotation to be printed when users print the PDF.booleanisReadOnly()Sets the annotation to be read only.booleanisRotatable()Is rotateable boolean.voidsetAnnotationIndex(int annotationIndex)Sets index of the annotation on a page.voidsetColorCode(String value)Sets the color of the annotation's 'Sticky Note'.voidsetContents(String value)Sets the contents of the 'sticky note' annotation.voidsetHeight(int height)Sets the height of your annotation's icon and interactive area in pixelsvoidsetHidden(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.voidsetPageIndex(int pageIndex)Sets index of the page to add the annotation.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.voidsetRotatable(boolean value)Sets rotatable.voidsetSubject(String value)Sets subject.voidsetTitle(String value)Sets title.voidsetWidth(int width)Sets the width of your annotation's icon and interactive area in pixelsvoidsetX(int x)Sets the horizontal X position of the annotation on your page in pixelsvoidsetY(int y)Sets the vertical Y position of the annotation on your page in pixels.StringtoString()Returns aStringthat represents this annotation.
 
- 
- 
- 
Constructor Detail- 
TextAnnotationpublic TextAnnotation() Instantiates a new text annotation.
 - 
TextAnnotationpublic TextAnnotation(String contents) Instantiates a new text annotation.- Parameters:
- contents- the contents of the 'sticky note' annotation
 
 
- 
 - 
Method Detail- 
getColorCodepublic String getColorCode() Gets the color of the annotation's 'Sticky Note'. Uses CSS '#ff66BB' hex color style.- Returns:
- the color code string.
 
 - 
setColorCodepublic void setColorCode(String value) Sets the color of the annotation's 'Sticky Note'. Uses CSS '#ff66BB' hex color style.- Parameters:
- value- the color code string.
 
 - 
getContentspublic String getContents() Gets the contents of the 'sticky note' annotation.- Returns:
- the contents of the 'sticky note' annotation.
 
 - 
setContentspublic void setContents(String value) Sets 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.
 
 - 
isRotatablepublic boolean isRotatable() Is rotateable boolean. Allows the annotation to be rotated. E.g. when the containing page os rotated.- Returns:
- the rotatable boolean.
 
 - 
setRotatablepublic void setRotatable(boolean value) Sets rotatable. Allows the annotation to be rotated. E.g. when the containing page os rotated.- Parameters:
- value- the rotateable value.
 
 - 
getTitlepublic String getTitle() Gets title. The main title of the annotation as displayed in the header of the 'sticky note'.- Returns:
- the title
 
 - 
setTitlepublic void setTitle(String value) Sets title. The main title of the annotation as displayed in the header of the 'sticky note'.- Parameters:
- value- the value
 
 - 
getSubjectpublic String getSubject() Gets subject. The subject of the annotation as displayed in the header of the 'sticky note'.- Returns:
- the subject.
 
 - 
setSubjectpublic void setSubject(String value) Sets subject. The subject of the annotation as displayed in the header of the 'sticky note'.- Parameters:
- value- the value.
 
 - 
getIconpublic AnnotationIcon getIcon() Gets icon. An icon to visually represent the 'sticky note' annotation.- Returns:
- the icon.
 
 - 
setIconpublic void setIcon(AnnotationIcon value) Sets icon. An icon to visually represent the 'sticky note' annotation.- Parameters:
- value- the value.
 
 - 
getHeightpublic int getHeight() Gets the height of your annotation's icon and interactive area in pixels
 - 
setHeightpublic void setHeight(int height) Sets the height of your annotation's icon and interactive area in pixels
 - 
getWidthpublic int getWidth() Gets the width of your annotation's icon and interactive area in pixels
 - 
setWidthpublic void setWidth(int width) Sets the width of your annotation's icon and interactive area in pixels
 - 
getYpublic int getY() Gets the vertical Y position of the annotation on your page in pixels. Measured from bottom upwards.
 - 
setYpublic void setY(int y) Sets the vertical Y position of the annotation on your page in pixels. Measured from bottom upwards.
 - 
getXpublic int getX() Gets the horizontal X position of the annotation on your page in pixels
 - 
setXpublic void setX(int x) Sets the horizontal X position of the annotation on your page in pixels
 - 
getPageIndexpublic int getPageIndex() Gets index of the page to add the annotation. The first page has a PageIndex of 0
 - 
setPageIndexpublic void setPageIndex(int pageIndex) Sets index of the page to add the annotation. The first page has a PageIndex of 0
 - 
getAnnotationIndexpublic int getAnnotationIndex() Gets index of the annotation on a page. The first page has a annotation_index of 0
 - 
setAnnotationIndexpublic void setAnnotationIndex(int annotationIndex) Sets index of the annotation on a page. The first page has a annotation_index of 0
 
- 
 
-