Package org.apache.pdfbox.pdmodel.fdf
Class FDFAnnotationTextMarkup
- java.lang.Object
-
- org.apache.pdfbox.pdmodel.fdf.FDFAnnotation
-
- org.apache.pdfbox.pdmodel.fdf.FDFAnnotationTextMarkup
-
- All Implemented Interfaces:
COSObjectable
- Direct Known Subclasses:
FDFAnnotationHighlight
,FDFAnnotationSquiggly
,FDFAnnotationStrikeOut
,FDFAnnotationUnderline
public abstract class FDFAnnotationTextMarkup extends FDFAnnotation
This abstract class is used as a superclass for the different FDF annotations with text markup attributes.
-
-
Field Summary
-
Fields inherited from class org.apache.pdfbox.pdmodel.fdf.FDFAnnotation
annot
-
-
Constructor Summary
Constructors Constructor Description FDFAnnotationTextMarkup()
Default constructor.FDFAnnotationTextMarkup(COSDictionary a)
Constructor.FDFAnnotationTextMarkup(org.w3c.dom.Element element)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description float[]
getCoords()
Get the coordinates of individual words or group of words.void
setCoords(float[] coords)
Set the coordinates of individual words or group of words.-
Methods inherited from class org.apache.pdfbox.pdmodel.fdf.FDFAnnotation
create, getBorderEffect, getBorderStyle, getColor, getContents, getCOSObject, getCreationDate, getDate, getIntent, getName, getOpacity, getPage, getRectangle, getRichContents, getStringOrStream, getSubject, getTitle, isHidden, isInvisible, isLocked, isLockedContents, isNoRotate, isNoView, isNoZoom, isPrinted, isReadOnly, isToggleNoView, setBorderEffect, setBorderStyle, setColor, setContents, setCreationDate, setDate, setHidden, setIntent, setInvisible, setLocked, setLockedContents, setName, setNoRotate, setNoView, setNoZoom, setOpacity, setPage, setPrinted, setReadOnly, setRectangle, setRichContents, setSubject, setTitle, setToggleNoView
-
-
-
-
Constructor Detail
-
FDFAnnotationTextMarkup
public FDFAnnotationTextMarkup()
Default constructor.
-
FDFAnnotationTextMarkup
public FDFAnnotationTextMarkup(COSDictionary a)
Constructor.- Parameters:
a
- An existing FDF Annotation.
-
FDFAnnotationTextMarkup
public FDFAnnotationTextMarkup(org.w3c.dom.Element element) throws java.io.IOException
Constructor.- Parameters:
element
- An XFDF element.- Throws:
java.io.IOException
- If there is an error extracting information from the element.
-
-
Method Detail
-
setCoords
public void setCoords(float[] coords)
Set the coordinates of individual words or group of words. The quadliterals shall encompasses a word or group of contiguous words in the text underlying the annotation. The coordinates for each quadrilateral shall be given in the order x1 y1 x2 y2 x3 y3 x4 y4.- Parameters:
coords
- an array of 8 n numbers specifying the coordinates of n quadrilaterals.
-
getCoords
public float[] getCoords()
Get the coordinates of individual words or group of words.- Returns:
- the array of 8 n numbers specifying the coordinates of n quadrilaterals.
- See Also:
setCoords(float[])
-
-