Top Description Fields Constructors Methods
org.apache.pdfbox.pdmodel.fdf

public Class FDFAnnotationFreeText

extends FDFAnnotation
Class Inheritance
Imports
java.io.IOException, javax.xml.xpath.XPath, .XPathExpressionException, .XPathFactory, org.apache.commons.logging.Log, .LogFactory, org.apache.pdfbox.cos.COSArray, .COSDictionary, .COSName, org.apache.pdfbox.pdmodel.common.PDRectangle, org.w3c.dom.Element

This represents a FreeText FDF annotation.
Author
Ben Litchfield

Field Summary

Modifier and TypeField and Description
private static final Log
public static final String
SUBTYPE

COS Model value for SubType entry.

Inherited from org.apache.pdfbox.pdmodel.fdf.FDFAnnotation:
annot

Constructor Summary

AccessConstructor and Description
public
FDFAnnotationFreeText()

Default constructor.

public
FDFAnnotationFreeText(COSDictionary
An existing FDF Annotation.
a
)

Constructor.

public
FDFAnnotationFreeText(Element
An XFDF element.
element
)

Constructor.

Method Summary

Modifier and TypeMethod and Description
public float[]

Returns:

An array of four or six numbers specifying a callout line attached to the free text annotation. Six numbers [ x1 y1 x2 y2 x3 y3 ] represent the starting, knee point, and ending coordinates of the line in default user space, Four numbers [ x1 y1 x2 y2 ] represent the starting and ending coordinates of the line.
getCallout
()

This will get the coordinates of the callout line.

public String

Returns:

The default appearance of the annotation.
getDefaultAppearance
()

Get the default appearance string.

public String

Returns:

The default style of the annotation.
getDefaultStyle
()

Get the default style string.

public PDRectangle

Returns:

the rectangle difference
getFringe
()

This will get the fringe.

public String

Returns:

The quadding of the text.
getJustification
()

This will get the form of quadding (justification) of the annotation text.

public String

Returns:

The ending style for the start point.
getLineEndingStyle
()

This will retrieve the line ending style.

public String

Returns:

The number of degrees of clockwise rotation.
getRotation
()

This will get the clockwise rotation in degrees.

private void
private void
public final void
setCallout(float[]
An array of four or six numbers specifying a callout line attached to the free text annotation. Six numbers [ x1 y1 x2 y2 x3 y3 ] represent the starting, knee point, and ending coordinates of the line in default user space, Four numbers [ x1 y1 x2 y2 ] represent the starting and ending coordinates of the line.
callout
)

This will set the coordinates of the callout line.

public final void
setDefaultAppearance(String
The new default appearance string.
appearance
)

Set the default appearance string.

public final void
setDefaultStyle(String
The new default style string.
style
)

Set the default style string.

public final void
setFringe(PDRectangle
the fringe
fringe
)

This will set the fringe rectangle.

public final void
setJustification(String
The quadding of the text.
justification
)

This will set the form of quadding (justification) of the annotation text.

public final void
setLineEndingStyle(String
The new style.
style
)

This will set the line ending style.

public final void
setRotation(int
The number of degrees of clockwise rotation.
rotation
)

This will set the clockwise rotation in degrees.

Inherited from org.apache.pdfbox.pdmodel.fdf.FDFAnnotation:
creategetBorderEffectgetBorderStylegetColorgetContentsgetCOSObjectgetCreationDategetDategetIntentgetNamegetOpacitygetPagegetRectanglegetRichContentsgetStringOrStreamgetSubjectgetTitleisHiddenisInvisibleisLockedisLockedContentsisNoRotateisNoViewisNoZoomisPrintedisReadOnlyisToggleNoViewsetBorderEffectsetBorderStylesetColorsetContentssetCreationDatesetDatesetHiddensetIntentsetInvisiblesetLockedsetLockedContentssetNamesetNoRotatesetNoViewsetNoZoomsetOpacitysetPagesetPrintedsetReadOnlysetRectanglesetRichContentssetSubjectsetTitlesetToggleNoView

Field Detail

LOGback to summary
private static final Log LOG

Hides org.apache.pdfbox.pdmodel.fdf.FDFAnnotation.LOG.

SUBTYPEback to summary
public static final String SUBTYPE

COS Model value for SubType entry.

Constructor Detail

FDFAnnotationFreeTextback to summary
public FDFAnnotationFreeText()

Default constructor.

FDFAnnotationFreeTextback to summary
public FDFAnnotationFreeText(COSDictionary a)

Constructor.

Parameters
a:COSDictionary

An existing FDF Annotation.

FDFAnnotationFreeTextback to summary
public FDFAnnotationFreeText(Element element) throws IOException

Constructor.

Parameters
element:Element

An XFDF element.

Exceptions
IOException:
If there is an error extracting information from the element.

Method Detail

getCalloutback to summary
public float[] getCallout()

This will get the coordinates of the callout line.

Returns:float[]

An array of four or six numbers specifying a callout line attached to the free text annotation. Six numbers [ x1 y1 x2 y2 x3 y3 ] represent the starting, knee point, and ending coordinates of the line in default user space, Four numbers [ x1 y1 x2 y2 ] represent the starting and ending coordinates of the line.

getDefaultAppearanceback to summary
public String getDefaultAppearance()

Get the default appearance string.

Returns:String

The default appearance of the annotation.

getDefaultStyleback to summary
public String getDefaultStyle()

Get the default style string.

Returns:String

The default style of the annotation.

getFringeback to summary
public PDRectangle getFringe()

This will get the fringe. Giving the difference between the annotations rectangle and where the drawing occurs. (To take account of any effects applied through the BE entry for example)

Returns:PDRectangle

the rectangle difference

getJustificationback to summary
public String getJustification()

This will get the form of quadding (justification) of the annotation text.

Returns:String

The quadding of the text.

getLineEndingStyleback to summary
public String getLineEndingStyle()

This will retrieve the line ending style.

Returns:String

The ending style for the start point.

getRotationback to summary
public String getRotation()

This will get the clockwise rotation in degrees.

Returns:String

The number of degrees of clockwise rotation.

initCalloutback to summary
private void initCallout(Element element)
initFringeback to summary
private void initFringe(Element element) throws IOException
setCalloutback to summary
public final void setCallout(float[] callout)

This will set the coordinates of the callout line.

Parameters
callout:float[]

An array of four or six numbers specifying a callout line attached to the free text annotation. Six numbers [ x1 y1 x2 y2 x3 y3 ] represent the starting, knee point, and ending coordinates of the line in default user space, Four numbers [ x1 y1 x2 y2 ] represent the starting and ending coordinates of the line.

setDefaultAppearanceback to summary
public final void setDefaultAppearance(String appearance)

Set the default appearance string.

Parameters
appearance:String

The new default appearance string.

setDefaultStyleback to summary
public final void setDefaultStyle(String style)

Set the default style string.

Parameters
style:String

The new default style string.

setFringeback to summary
public final void setFringe(PDRectangle fringe)

This will set the fringe rectangle. Giving the difference between the annotations rectangle and where the drawing occurs. (To take account of any effects applied through the BE entry for example)

Parameters
fringe:PDRectangle

the fringe

setJustificationback to summary
public final void setJustification(String justification)

This will set the form of quadding (justification) of the annotation text.

Parameters
justification:String

The quadding of the text.

setLineEndingStyleback to summary
public final void setLineEndingStyle(String style)

This will set the line ending style.

Parameters
style:String

The new style.

setRotationback to summary
public final void setRotation(int rotation)

This will set the clockwise rotation in degrees.

Parameters
rotation:int

The number of degrees of clockwise rotation.