public interface IAnnotationFactory
Modifier and Type | Method and Description |
---|---|
Callout |
createCallout(String contents)
Constructs a callout annotation with the given content.
|
Circle |
createCircle(String contents)
Constructs a circle annotation with the given content.
|
FileAttachment |
createFileAttachment()
Creates an empty file attachment object.
|
FileAttachment |
createFileAttachment(byte[] fileContents,
String fileName,
Date modDate,
Date creationDate,
String popupText)
Constructs a file attachment annotation.
|
FileAttachment |
createFileAttachment(File attachFile,
String popupText)
Convenience constructor to create a file attachment from a file system file.
|
FileAttachment |
createFileAttachment(InputStream inStream,
String fileName,
Date modDate,
Date creationDate,
String popupText)
Creates a file attachment from an input stream.
|
FreeText |
createFreeText(String contents)
Constructs a free text annotation with the given content.
|
Ink |
createInk(String contents,
List<Vertices> polyLines)
Constructs an Ink annotation.
|
Line |
createLine(String contents,
double x1,
double y1,
double x2,
double y2)
Constructs a line annotation with the given content.
|
Line |
createLine(String contents,
double x1,
double y1,
double x2,
double y2,
String intent)
Constructs a line annotation with the given content and intent.
|
Link |
createLink()
Constructs a Link annotation.
|
Polygon |
createPolygon(String contents,
Vertices vertices,
String intent)
Constructs a polygon annotation.
|
Polyline |
createPolyline(String contents,
Vertices vertices,
String intent)
Constructs a polyline annotation.
|
Popup |
createPopup(boolean initalOpen)
Constructs a popup annotation with the given open flag.
|
Redaction |
createRedaction(String contents)
Constructs a Redaction annotation with the given content.
|
Redaction |
createRedaction(String contents,
Vector<Point2D[]> quadList)
Constructs a new Redaction annotation defined by the quadList rather than it's rectangular bounds,
unless the quadList is empty.
|
RubberStamp |
createRubberStamp(Image image,
ImageCompression imageCompression)
Constructs a rubber stamp annotation with the given image.
|
RubberStamp |
createRubberStamp(IPDFPage page)
Constructs a rubber stamp annotation with the content stream from a PDF page.
|
RubberStamp |
createRubberStamp(String text,
Color color)
Construct a rubber stamp annotation with custom text and custom color.
|
RubberStamp |
createRubberStamp(String text,
Color color,
double scale)
Construct a text rubber stamp annotation.
|
Sound |
createSound(AudioFormat format,
byte[] content)
Constructs a sound annotation from an AudioFormat object and an
array of bytes containing the audio content.
|
Sound |
createSound(AudioInputStream audioStream)
Constructs a sound annotation from an AudioInputStream object.
|
Square |
createSquare(String contents)
Constructs a square annotation with the given content.
|
Text |
createText(String contents,
boolean initialOpen,
String iconName)
Construct a Text annotation.
|
TextMarkup |
createTextMarkup(String contents,
Vector<Point2D[]> quadList,
String subtype)
Constructs a new TextMarkup annotation.
|
FreeText |
createTypeWriter(String contents)
Constructs a typewriter annotation with the given content.
|
FreeText createFreeText(String contents)
contents
- The text content.Circle createCircle(String contents)
contents
- The text contents to display when the annotation is opened.Callout createCallout(String contents)
contents
- The text content.FileAttachment createFileAttachment(byte[] fileContents, String fileName, Date modDate, Date creationDate, String popupText) throws IOException, PDFException
fileContents
- The binary contents of the file.fileName
- The name of the file.modDate
- The modification date of the file.creationDate
- The creation date of the file.popupText
- The popup text to display when the mouse hovers over the annotation.PDFException
IOException
FileAttachment createFileAttachment(File attachFile, String popupText) throws IOException, PDFException
attachFile
- The file to attach. The constructor reads the contents of the file into memory.popupText
- The popup text to display when the mouse hovers over the annotation.IOException
PDFException
FileAttachment createFileAttachment(InputStream inStream, String fileName, Date modDate, Date creationDate, String popupText) throws IOException, PDFException
inStream
- The input stream to get the file attachment contents from.fileName
- The name of the file.modDate
- The modification date of the file.creationDate
- The creation date of the file.popupText
- The popup text to display when the mouse hovers over the annotation.IOException
- Thrown when there is any errors reading the input stream.PDFException
FileAttachment createFileAttachment()
Ink createInk(String contents, List<Vertices> polyLines)
contents
- The text contents to display when the annotation is opened.polyLines
- a List of polylines, each polyline represented by a Vertices object. Each object in the list
is a gesture of the Ink annotation.Line createLine(String contents, double x1, double y1, double x2, double y2)
contents
- The text contents to display when the annotation is opened.x1
- The x coordinate of the origin of the line.y1
- The y coordinate of the origin of the line.x2
- The x coordinate of the end point of the line.y2
- The y coordinate of the end point of the line.Line createLine(String contents, double x1, double y1, double x2, double y2, String intent)
contents
- The text contents to display when the annotation is opened.x1
- The x coordinate of the origin of the line.y1
- The y coordinate of the origin of the line.x2
- The x coordinate of the end point of the line.y2
- The y coordinate of the end point of the line.intent
- The line's "intent", this can be one of the following values: null, Line.LINE_ARROW, Line.LINE_DIMENSION.Link createLink()
TextMarkup createTextMarkup(String contents, Vector<Point2D[]> quadList, String subtype)
contents
- The text contents to display when the annotation is opened.quadList
- The new list of quadrilaterals that compose this annotation. Each item in the list should
be an array of 4 Point.Double objects.subtype
- type of the markup annotations. Possible values are Highlight, Underline, StrikeOut, Squiggly.Polygon createPolygon(String contents, Vertices vertices, String intent)
contents
- The text contents to display when the annotation is opened.vertices
- The list of points that defines the polygon.Polyline createPolyline(String contents, Vertices vertices, String intent)
contents
- The text contents to display when the annotation is opened.vertices
- The list of points that defines the polyline.Popup createPopup(boolean initalOpen)
initalOpen
- Flag indicating whether this annotation should be displayed
open initially.RubberStamp createRubberStamp(Image image, ImageCompression imageCompression)
image
- a java imageimageCompression
- the compression settingsRubberStamp createRubberStamp(String text, Color color)
text
- the text to display in the stampcolor
- the color of the textRubberStamp createRubberStamp(String text, Color color, double scale)
text
- the text to display in the stampcolor
- the color of the textscale
- percentage scale for the stamp, 100 = 1:1.RubberStamp createRubberStamp(IPDFPage page) throws PDFException
page
- The PDF page used to create the rubber stamp annotation.PDFException
Sound createSound(AudioFormat format, byte[] content)
format
- The format of the audio.content
- The audio content.Sound createSound(AudioInputStream audioStream) throws IOException
audioStream
- The audio streamIOException
- When there is an error reading from the AudioInputStream.Square createSquare(String contents)
contents
- The text contents to display when the annotation is opened.Text createText(String contents, boolean initialOpen, String iconName)
contents
- The textual content.initialOpen
- Flag indicating whether this annotation should be displayed
open initially.iconName
- The name of the icon to use when displaying the annotation in its
un-opened mode. Please use one of the constants defined in this class (ICON_XXXX)
to set the name of the icon.Redaction createRedaction(String contents)
contents
- The text contents to display when the annotation is opened.Redaction createRedaction(String contents, Vector<Point2D[]> quadList)
contents
- The text contents to display when the annotation is opened.quadList
- The new list of quadrilaterals that compose this annotation. Each item in the list should
be an array of 4 Point.Double objects.