java.lang.Object | |||
↳ | com.pdftron.pdf.Annot | ||
↳ | com.pdftron.pdf.annots.Markup | ||
↳ | com.pdftron.pdf.annots.FreeText |
A free text annotation (PDF 1.3) displays text directly on the page. Unlike an ordinary text annotation, a free text annotation has no open or closed state; instead of being displayed in a pop-up window, the text shall be always visible.
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
int | e_FreeText | This integer list spedifies the intention of the FreeText annotation e_FreeText - The annotation ntended to function as a plain free-text annotation. | |||||||||
int | e_FreeTextCallout | The Constant e_FreeTextCallout. | |||||||||
int | e_FreeTextTypeWriter | The Constant e_FreeTextTypeWriter. | |||||||||
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 | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
FreeText(Obj d)
Creates an FreeText annotation and initialize it using given Cos/SDF object.
| |||||||||||
FreeText()
Creates an empty FreeText annotation.
| |||||||||||
FreeText(Annot annot)
Creates an FreeText annotation and initialize it using given annotation object.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
static FreeText |
create(Doc doc, Rect pos)
Creates a new FreeText annotation, in the specified document.
| ||||||||||
Point |
getCalloutLinePoint1()
Get p1 of the callout line points of the FreeText annotation.
| ||||||||||
Point |
getCalloutLinePoint2()
Get p2 of the callout line points of the FreeText annotation.
| ||||||||||
Point |
getCalloutLinePoint3()
Get p3 of the callout line points of the FreeText annotation.
| ||||||||||
String |
getDefaultAppearance()
Get the default appearance of the FreeText annotation.
| ||||||||||
int |
getEndingStyle()
Get the ending style of the callout line of the FreeText Annotation.
| ||||||||||
double |
getFontSize()
Returns the font size of the FreeText Annotation.
| ||||||||||
int |
getIntentName()
Get the Intent name as an entry from the enum "IntentName"
of the annnotation type.
| ||||||||||
ColorPt |
getLineColor()
Returns the line and border color of the FreeText Annotation.
| ||||||||||
int |
getLineColorCompNum()
Returns the number of color components in the line and border color
of the FreeText Annotation.
| ||||||||||
int |
getQuaddingFormat()
Get the quading format of the FreeText annotation.
| ||||||||||
ColorPt |
getTextColor()
Returns the text color of the FreeText Annotation.
| ||||||||||
int |
getTextColorCompNum()
Returns the number of color components in the line and border color
of the FreeText Annotation.
| ||||||||||
void |
setCalloutLinePoints(Point p1, Point p2)
Set the callout line points of the FreeText annotation.
| ||||||||||
void |
setCalloutLinePoints(Point p1, Point p2, Point p3)
Set the callout line points of the FreeText annotation.
| ||||||||||
void |
setDefaultAppearance(String app_str)
Set the default appearance of the FreeText annotation.
| ||||||||||
void |
setEndingStyle(String est)
Set the ending style of the callout line of the FreeText Annotation.
| ||||||||||
void |
setEndingStyle(int est)
Set the ending style of the callout line of the FreeText Annotation.
| ||||||||||
void |
setFontName(String fontName)
Sets the default font name of the FreeText Annotation.
| ||||||||||
void |
setFontSize(double font_size)
Sets the font size of the FreeText Annotation.
| ||||||||||
void |
setIntentName(int mode)
Set the Intent name as an entry from the enum "IntentName"
of the annnotation type.
| ||||||||||
void |
setLineColor(ColorPt color, int col_comp)
Set the line and border color of the FreeText Annotation.
| ||||||||||
void |
setQuaddingFormat(int app_qform)
Set the quading format of the FreeText annotation.
| ||||||||||
void |
setTextColor(ColorPt color, int col_comp)
Set the text color of the FreeText 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 spedifies the intention of the FreeText annotation e_FreeText - The annotation ntended to function as a plain free-text annotation. A plain free-text annotation is also known as a text box comment. e_FreeTextCallout - The annotation is intended to function as a callout. The callout is associated with an area on the page through the callout line specified in CL. e_FreeTextTypeWriter - The annotation is intended to function as a click-to-type or typewriter object and no callout line is drawn. e_Unknow - Undefined (Userdefined) intent type.
The Constant e_FreeTextCallout.
The Constant e_FreeTextTypeWriter.
The Constant e_Unknown.
Creates an FreeText 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 | input Cos/SDF object |
---|
Creates an empty FreeText annotation.
Creates an FreeText 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 | input annotation object |
---|
PDFNetException |
---|
Creates a new FreeText annotation, in the specified document.
doc | A document to which the FreeText annotation is added. |
---|---|
pos | A rectangle specifying the FreeText annotation's bounds, specified in user space coordinates. |
PDFNetException |
---|
Get p1 of the callout line points of the FreeText annotation.
Note: The returning values are two or three Point objects specifying a callout line attached to the free text annotation. Three Point objects represent the starting, knee point, and ending coordinates of the line in default user space, two Point objects represent the starting and ending coordinates of the line.
If the line is straight, i.e. only has two points, two valid points will be returned in p1 and p2, the p3 will be a point with negative x and y coordinate values.
PDFNetException |
---|
Get p2 of the callout line points of the FreeText annotation.
Note: The returning values are two or three Point objects specifying a callout line attached to the free text annotation. Three Point objects represent the starting, knee point, and ending coordinates of the line in default user space, two Point objects represent the starting and ending coordinates of the line.
If the line is straight, i.e. only has two points, two valid points will be returned in p1 and p2, the p3 will be a point with negative x and y coordinate values.
PDFNetException |
---|
Get p3 of the callout line points of the FreeText annotation.
Note: The returning values are two or three Point objects specifying a callout line attached to the free text annotation. Three Point objects represent the starting, knee point, and ending coordinates of the line in default user space, two Point objects represent the starting and ending coordinates of the line.
If the line is straight, i.e. only has two points, two valid points will be returned in p1 and p2, the p3 will be a point with negative x and y coordinate values.
PDFNetException |
---|
Get the default appearance of the FreeText annotation.
Note: The default appearance string shall be used in formatting the text.The annotation dictionary's Appearance (AP) entry, if present, shall take precedence over this entry.
PDFNetException |
---|
Get the ending style of the callout line of the FreeText Annotation.
Note: The ending style specifies the line ending style that shall be used in drawing the callout line specified in CallOut Line Points (CL). The enum entry shall specify the line ending style for the endpoint defined by the starting point(p1) of the CallOut Line Points. Default value: e_None.
PDFNetException |
---|
Get the Intent name as an entry from the enum "IntentName" of the annnotation type.
Note: The intent name describes the intent of the free text annotation. The following values shall be valid: e_FreeText - The annotation is intended to function as a plain free-text annotation. A plain free-text annotation is also known as a text box comment. e_FreeTextCallout - The annotation is intended to function as a callout. The callout is associated with an area on the page through the callout line specified in CL. e_FreeTextTypeWriter - The annotation is intended to function as a click-to-type or typewriter object and no callout line is drawn. Default value: e_FreeText
PDFNetException |
---|
Returns the line and border color of the FreeText Annotation.
PDFNetException |
---|
Returns the number of color components in the line and border color of the FreeText Annotation.
PDFNetException |
---|
Get the quading format of the FreeText annotation.
Note: The int code specifies the form of quadding (justification) that shall be used in displaying the annotation's text: 0Left-justified 1Centered 2Right-justified Default value: 0 (left-justified).
PDFNetException |
---|
Returns the text color of the FreeText Annotation.
Note: In rich text annotations, some or all of the text may have a different color than the default text color.
PDFNetException |
---|
Returns the number of color components in the line and border color of the FreeText Annotation.
PDFNetException |
---|
Set the callout line points of the FreeText annotation. (Optional; meaningful only if IT is FreeTextCallout; PDF 1.6)
Note: The two Point objects specifies a callout line attached to the free text annotation. Tbe two Point objects represent the starting and ending coordinates of the line.
p1 | The staring point. |
---|---|
p2 | The ending point. |
PDFNetException |
---|
Set the callout line points of the FreeText annotation. (Optional; meaningful only if IT is FreeTextCallout; PDF 1.6)
Note: The three Point objects specify a callout line attached to the free text annotation. The three Point objects represent the starting, knee point, and ending coordinates of the line in default user space.
p1 | The staring point. |
---|---|
p2 | The ending point. |
p3 | The knee point. |
PDFNetException |
---|
Set the default appearance of the FreeText annotation.
Note: The default appearance string shall be used in formatting the text.The annotation dictionary's Appearance (AP) entry, if present, shall take precedence over this entry.
app_str | A string representing the default appearance of the FreeText annotation. |
---|
PDFNetException |
---|
Set the ending style of the callout line of the FreeText Annotation. (Optional; meaningful only if CL is present; PDF 1.6)
Note: The ending style specifies the line ending style that shall be used in drawing the callout line specified in CallOut Line Points (CL). The enum entry shall specify the line ending style for the endpoint defined by the starting point(p1) of the CallOut Line Points. Default value: "None".
est | The ending style represented using a string. |
---|
PDFNetException |
---|
Set the ending style of the callout line of the FreeText Annotation. (Optional; meaningful only if CL is present; PDF 1.6)
Note: The ending style specifies the line ending style that shall be used in drawing the callout line specified in CallOut Line Points (CL). The enum entry shall specify the line ending style for the endpoint defined by the starting point(p1) of the CallOut Line Points. Default value: e_None.
est | The ending style represented using one of the entries of the enum "EndingStyle" |
---|
PDFNetException |
---|
Sets the default font name of the FreeText Annotation.
fontName | font name |
---|
PDFNetException |
---|
Sets the font size of the FreeText Annotation.
font_size | font size |
---|
PDFNetException |
---|
Set the Intent name as an entry from the enum "IntentName" of the annnotation type. (Optional; PDF 1.4)
Note: The intent name describes the intent of the free text annotation. The following values shall be valid: e_FreeText - The annotation is intended to function as a plain free-text annotation. A plain free - text annotation is also known as a text box comment. e_FreeTextCallout - The annotation is intended to function as a callout. The callout is associated with an area on the page through the callout line specified in CL. e_FreeTextTypeWriter - The annotation is intended to function as a click-to-type or typewriter object and no callout line is drawn. Default value: e_FreeText
mode | The intent name of the annotation as an entry from the enum "IntentJName". |
---|
PDFNetException |
---|
Set the line and border color of the FreeText Annotation.
Note: Current implementation of this method creates a non-standard entry in the annotation dictionary and uses it to generate the appearance stream. Make sure you call RefreshAppearance() after changing text or line color, and remember that editing the annotation in other PDF application will produce different appearance.
color | ColorPt object representing the color. |
---|---|
col_comp | number of colorant components in ColorPt object. |
PDFNetException |
---|
Set the quading format of the FreeText annotation. (Optional; PDF 1.4)
Note: The int code specifies the form of quadding (justification) that shall be used in displaying the annotation's text:
app_qform | the new quadding format |
---|
PDFNetException |
---|
Set the text color of the FreeText Annotation.
Note: Current implementation of this method creates a non-standard entry in the annotation dictionary and uses it to generate the appearance stream. Make sure you call RefreshAppearance() after changing text or line color, and remember that editing the annotation in other PDF application will produce different appearance.
color | ColorPt object representing the color. |
---|---|
col_comp | number of colorant components in ColorPt object. |
PDFNetException |
---|