java.lang.Object | |||
↳ | com.pdftron.pdf.Annot | ||
↳ | com.pdftron.pdf.annots.Markup | ||
↳ | com.pdftron.pdf.annots.Text |
A text annotation represents a "sticky note" attached to a point in the PDF document. When closed, the annotation shall appear as an icon; when open, it shall display a pop-up window containing the text of the note in a font and size chosen by the conforming reader. Text annotations shall not scale and rotate with the page; they shall behave as if the NoZoom and NoRotate annotation flags.
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
int | e_Comment | This integer list represents type of icon corresponding with the Text annotation. | |||||||||
int | e_Help | The Constant e_Help. | |||||||||
int | e_Insert | The Constant e_Insert. | |||||||||
int | e_Key | The Constant e_Key. | |||||||||
int | e_NewParagraph | The Constant e_NewParagraph. | |||||||||
int | e_Note | The Constant e_Note. | |||||||||
int | e_Paragraph | The Constant e_Paragraph. | |||||||||
int | e_Unknown | The Constant e_Unknown. |
[Expand]
Inherited Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
com.pdftron.pdf.annots.Markup
| |||||||||||
From class
com.pdftron.pdf.Annot
|
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Text(Obj d)
Creates a Text annotation and initialize it using given Cos/SDF object.
| |||||||||||
Text()
Creates an empty Text annotation.
| |||||||||||
Text(Annot annot)
Creates a Text annotation and initialize it using given annotation object.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
static Text |
create(Doc doc, Point pos, String contents)
Creates a new Text annotation, in the specified document.
| ||||||||||
static Text |
create(Doc doc, Point pos)
Creates a new Text annotation, in the specified document.
| ||||||||||
Point |
getAnchorPosition()
Returns anchor point position (in relative coordinates) - the point that won't move when the page is zoomed in/out
Anchor point position is in relative coordinates [0,1], and default is upper-left corner (0,1)
| ||||||||||
int |
getIcon()
Get the Icon type as an entry of the enum "Icon".
| ||||||||||
String |
getIconName()
Get the string indicating the type of icon corresponding to
the Text annotation.
| ||||||||||
String |
getState()
Get the string indicating the state of the Text annotation.
| ||||||||||
String |
getStateModel()
Get the string indicating the state model of the Text annotation.
| ||||||||||
void |
setAnchorPosition(Point pt)
Sets anchor point position (in coordinates relative to the annotation Rect) - the point that won't move when the page is zoomed in/out and/or if the page is rotated.
| ||||||||||
void |
setIcon(int icon)
Set the Icon type as an entry of the enum "Icon".
| ||||||||||
void |
setIcon(String icon)
Set the string indicating the type of icon corresponding to
(Optional).
| ||||||||||
void |
setState(String state)
Set the string indicating the state of the Text annotation.
| ||||||||||
void |
setStateModel(String statemodule)
Set the string indicating the state model of the Text annotation.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
com.pdftron.pdf.annots.Markup
| |||||||||||
From class
com.pdftron.pdf.Annot
| |||||||||||
From class
java.lang.Object
|
This integer list represents type of icon corresponding with the Text annotation. e_Comment, e_Key, e_Help, e_NewParagraph, e_Paragraph, e_Insert, e_Note, e_Unknown - This corresponds to user defined names.
The Constant e_Help.
The Constant e_Insert.
The Constant e_Key.
The Constant e_NewParagraph.
The Constant e_Note.
The Constant e_Paragraph.
The Constant e_Unknown.
Creates a Text annotation and initialize it using given Cos/SDF object.
Note: The constructor does not copy any data, but is instead the logical equivalent of a type cast.
d | the input Cos/SDF object |
---|
Creates an empty Text annotation.
Creates a Text annotation and initialize it using given annotation object.
Note: The constructor does not copy any data, but is instead the logical equivalent of a type cast.
annot | the annot |
---|
PDFNetException |
---|
Creates a new Text annotation, in the specified document.
doc | A document to which the annotation is added. |
---|---|
pos | A rectangle specifying the annotation's bounds, specified in user space coordinates. |
contents | The text contents of the Text annotation. |
PDFNetException |
---|
Creates a new Text annotation, in the specified document.
doc | A document to which the annotation is added. |
---|---|
pos | A rectangle specifying the annotation's bounds, specified in user space coordinates. |
PDFNetException |
---|
Returns anchor point position (in relative coordinates) - the point that won't move when the page is zoomed in/out Anchor point position is in relative coordinates [0,1], and default is upper-left corner (0,1)
PDFNetException |
---|
Get the Icon type as an entry of the enum "Icon".
Note: The icon type represnets the name of an icon that shall be used in displaying the annotation. Conforming readers shall provide predefined icon appearances for at least the following standard icon types: e_Comment, e_Key, e_Note, e_Help, e_NewParagraph, e_Paragraph, e_Insert Additional names may be supported as well. Default value: e_Note. The annotation dictionary's Appearance(AP) entry, if present, shall take precedence over this Name entry.
PDFNetException |
---|
Get the string indicating the type of icon corresponding to the Text annotation.
Note: the icon type represnets the name of an icon that shall be used in displaying the annotation. Conforming readers shall provide predefined icon appearances for at least the following standard icon types: e_Comment, e_Key, e_Note, e_Help, e_NewParagraph, e_Paragraph, e_Insert Additional names may be supported as well. Default value: Note. The annotation dictionary's Appearance(AP) entry, if present, shall take precedence over this Name entry.
PDFNetException |
---|
Get the string indicating the state of the Text annotation.
PDFNetException | * Note: The state is a state to which the original annotation shall be set. Default: "Unmarked" if StateModel is "Marked"; "None" if StateModel is "Review". |
---|
Get the string indicating the state model of the Text annotation.
PDFNetException | * Note: The State model is the state model corresponding to the State entry; |
---|
Sets anchor point position (in coordinates relative to the annotation Rect) - the point that won't move when the page is zoomed in/out and/or if the page is rotated.
pt | Anchor point position in relative coordinates [0,1], where 0,0 is bottom left corner of the annotation, and 1,1 is top right corner. Default: 0,1 |
---|
PDFNetException |
---|
Set the Icon type as an entry of the enum "Icon". (Optional)
icon | An entry of "Icon" that represents the type of icon that is corresponding with this Text annotation. |
---|
PDFNetException | * Note: the icon type represnets the name of an icon that shall be used in displaying the annotation. Conforming readers shall provide predefined icon appearances for at least the following standard icon names: Comment, Key, Note, Help, NewParagraph, Paragraph, Insert Additional names may be supported as well. Default value: e_Note. The annotation dictionary's Appearance(AP) entry, if present, shall take precedence over this Name entry. |
---|
Set the string indicating the type of icon corresponding to (Optional).
icon | A string that represents the type of icon that is corresponding with this Text annotation. |
---|
PDFNetException | * Note: the icon type represnets the name of an icon that shall be used in displaying the annotation. Conforming readers shall provide predefined icon appearances for at least the following standard icon types: e_Comment, e_Key, e_Note, e_Help, e_NewParagraph, e_Paragraph, e_Insert Additional names may be supported as well. Default value: Note. The annotation dictionary's Appearance(AP) entry, if present, shall take precedence over this Name entry. |
---|
Set the string indicating the state of the Text annotation. (Optional; PDF 1.5 )
state | A string that represents the state of the Text annotation. |
---|
PDFNetException | * Note: The state is a state to which the original annotation shall be set. Default: "Unmarked" if StateModel is "Marked"; "None" if StateModel is "Review". |
---|
Set the string indicating the state model of the Text annotation. (Required if State is present, otherwise optional; PDF 1.5 )
statemodule | - A string that represents the state model of the Text annotation. |
---|
PDFNetException | * Note: The State model is the state model corresponding to the State entry; |
---|