com.lowagie.text.pdf
public class PdfAnnotation extends PdfDictionary
PdfAnnotation
is a note that is associated with a page.
See Also: PdfDictionary
Nested Class Summary | |
---|---|
static class | PdfAnnotation.PdfImportedLink
This class processes links from imported pages so that they may be active. |
Field Summary | |
---|---|
static PdfName | AA_BLUR attributevalue |
static PdfName | AA_DOWN attributevalue |
static PdfName | AA_ENTER attributevalue |
static PdfName | AA_EXIT attributevalue |
static PdfName | AA_FOCUS attributevalue |
static PdfName | AA_JS_CHANGE attributevalue |
static PdfName | AA_JS_FORMAT attributevalue |
static PdfName | AA_JS_KEY attributevalue |
static PdfName | AA_JS_OTHER_CHANGE attributevalue |
static PdfName | AA_UP attributevalue |
static PdfName | APPEARANCE_DOWN appearance attributename |
static PdfName | APPEARANCE_NORMAL appearance attributename |
static PdfName | APPEARANCE_ROLLOVER appearance attributename |
protected boolean | annotation |
protected boolean | form |
static int | FLAGS_HIDDEN flagvalue |
static int | FLAGS_INVISIBLE flagvalue |
static int | FLAGS_LOCKED flagvalue |
static int | FLAGS_NOROTATE flagvalue |
static int | FLAGS_NOVIEW flagvalue |
static int | FLAGS_NOZOOM flagvalue |
static int | FLAGS_PRINT flagvalue |
static int | FLAGS_READONLY flagvalue |
static int | FLAGS_TOGGLENOVIEW flagvalue |
static PdfName | HIGHLIGHT_INVERT highlight attributename |
static PdfName | HIGHLIGHT_NONE highlight attributename |
static PdfName | HIGHLIGHT_OUTLINE highlight attributename |
static PdfName | HIGHLIGHT_PUSH highlight attributename |
static PdfName | HIGHLIGHT_TOGGLE highlight attributename |
static int | MARKUP_HIGHLIGHT attributevalue |
static int | MARKUP_SQUIGGLY
attributevalue |
static int | MARKUP_STRIKEOUT attributevalue |
static int | MARKUP_UNDERLINE attributevalue |
int | placeInPage Holds value of property placeInPage. |
protected HashMap | templates |
protected boolean | used Holds value of property used. |
protected PdfWriter | writer |
Constructor Summary | |
---|---|
PdfAnnotation(PdfWriter writer, Rectangle rect) | |
PdfAnnotation(PdfWriter writer, float llx, float lly, float urx, float ury, PdfString title, PdfString content)
Constructs a new PdfAnnotation of subtype text. | |
PdfAnnotation(PdfWriter writer, float llx, float lly, float urx, float ury, PdfAction action)
Constructs a new PdfAnnotation of subtype link (Action). |
Method Summary | |
---|---|
static PdfAnnotation | createFileAttachment(PdfWriter writer, Rectangle rect, String contents, byte[] fileStore, String file, String fileDisplay) Creates a file attachment annotation. |
static PdfAnnotation | createFileAttachment(PdfWriter writer, Rectangle rect, String contents, PdfFileSpecification fs) Creates a file attachment annotation |
static PdfAnnotation | createFreeText(PdfWriter writer, Rectangle rect, String contents, PdfContentByte defaultAppearance)
Add some free text to the document. |
static PdfAnnotation | createInk(PdfWriter writer, Rectangle rect, String contents, float[][] inkList) |
static PdfAnnotation | createLine(PdfWriter writer, Rectangle rect, String contents, float x1, float y1, float x2, float y2)
Adds a line to the document. |
protected static PdfAnnotation | createLink(PdfWriter writer, Rectangle rect, PdfName highlight)
Creates a link. |
static PdfAnnotation | createLink(PdfWriter writer, Rectangle rect, PdfName highlight, PdfAction action)
Creates an Annotation with an Action. |
static PdfAnnotation | createLink(PdfWriter writer, Rectangle rect, PdfName highlight, String namedDestination)
Creates an Annotation with an local destination. |
static PdfAnnotation | createLink(PdfWriter writer, Rectangle rect, PdfName highlight, int page, PdfDestination dest)
Creates an Annotation with a PdfDestination. |
static PdfAnnotation | createMarkup(PdfWriter writer, Rectangle rect, String contents, int type, float[] quadPoints) |
static PdfAnnotation | createPopup(PdfWriter writer, Rectangle rect, String contents, boolean open)
Adds a popup to your document. |
static PdfAnnotation | createScreen(PdfWriter writer, Rectangle rect, String clipTitle, PdfFileSpecification fs, String mimeType, boolean playOnDisplay)
Creates a screen PdfAnnotation |
static PdfAnnotation | createSquareCircle(PdfWriter writer, Rectangle rect, String contents, boolean square)
Adds a circle or a square that shows a tooltip when you pass over it. |
static PdfAnnotation | createStamp(PdfWriter writer, Rectangle rect, String contents, String name)
Adds a Stamp to your document. |
static PdfAnnotation | createText(PdfWriter writer, Rectangle rect, String title, String contents, boolean open, String icon) |
PdfIndirectReference | getIndirectReference() |
PdfIndirectReference | getIndRef()
Override base class behavior. |
PdfDictionary | getMK() |
static PdfArray | getMKColor(Color color) |
int | getPlaceInPage() Getter for property placeInPage. |
HashMap | getTemplates() |
boolean | isAnnotation() Getter for property annotation. |
boolean | isForm() Getter for property form. |
boolean | isUsed() Getter for property used. |
void | setAction(PdfAction action) |
void | setAdditionalActions(PdfName key, PdfAction action) |
void | setAppearance(PdfName ap, PdfTemplate template) |
void | setAppearance(PdfName ap, String state, PdfTemplate template) |
void | setAppearanceState(String state) |
void | setBorder(PdfBorderArray border) |
void | setBorderStyle(PdfBorderDictionary border) |
void | setColor(Color color) |
void | setDefaultAppearanceString(PdfContentByte cb) |
void | setFlags(int flags) |
void | setHighlighting(PdfName highlight)
Sets the annotation's highlighting mode. |
void | setLayer(PdfOCG layer)
Sets the layer this annotation belongs to. |
void | setMarkedObject(PdfStructureElement struc)
Set the structure element of this annotation. |
void | setMKAlternateCaption(String caption) |
void | setMKAlternateIcon(PdfTemplate template) |
void | setMKBackgroundColor(Color color) |
void | setMKBorderColor(Color color) |
void | setMKIconFit(PdfName scale, PdfName scalingType, float leftoverLeft, float leftoverBottom, boolean fitInBounds) |
void | setMKNormalCaption(String caption) |
void | setMKNormalIcon(PdfTemplate template) |
void | setMKRolloverCaption(String caption) |
void | setMKRolloverIcon(PdfTemplate template) |
void | setMKRotation(int rotation) |
void | setMKTextPosition(int tp) |
void | setName(String name)
Sets the name of the annotation.
|
void | setPage(int page) |
void | setPage() |
void | setPlaceInPage(int placeInPage) Places the annotation in a specified page that must be greater
or equal to the current one. |
void | setPopup(PdfAnnotation popup) |
void | setRotate(int v) |
void | setTitle(String title) |
void | setUsed() Setter for property used. |
Since: 2.1.3
PdfAnnotation
of subtype text.Parameters: writer llx lly urx ury title content
PdfAnnotation
of subtype link (Action).Parameters: writer llx lly urx ury action
Parameters: writer the PdfWriter
rect the dimensions in the page of the annotation contents the file description fileStore an array with the file. If it's null
the file will be read from the disk file the path to the file. It will only be used if
fileStore
is not null
fileDisplay the actual file name stored in the pdf
Returns: the annotation
Throws: IOException on error
Parameters: writer rect contents fs
Returns: the annotation
Throws: IOException
Parameters: writer rect contents defaultAppearance
Returns: A PdfAnnotation
Parameters: writer rect contents x1 y1 x2 y2
Returns: A PdfAnnotation
Parameters: writer rect highlight
Returns: A PdfAnnotation
Parameters: writer rect highlight action
Returns: A PdfAnnotation
Parameters: writer rect highlight namedDestination
Returns: A PdfAnnotation
Parameters: writer rect highlight page dest
Returns: A PdfAnnotation
Parameters: writer rect contents open
Returns: A PdfAnnotation
Parameters: writer rect clipTitle fs mimeType playOnDisplay
Returns: a screen PdfAnnotation
Throws: IOException
Parameters: writer rect contents The tooltip square true if you want a square, false if you want a circle
Returns: A PdfAnnotation
Parameters: writer rect contents name
Returns: A PdfAnnotation
Parameters: writer rect title contents open icon
Returns: a PdfAnnotation
Deprecated: use getIndRef instead
Returns: the indirect reference
Returns: an indirect reference for this annotation
Since: 2.1.5
Returns: Value of property placeInPage.
Returns: Value of property annotation.
Returns: Value of property form.
Returns: Value of property used.
HIGHLIGHT_NONE
, HIGHLIGHT_INVERT
,
HIGHLIGHT_OUTLINE
and HIGHLIGHT_PUSH
;Parameters: highlight the annotation's highlighting mode
Parameters: layer the layer this annotation belongs to
Parameters: struc
Since: 2.1.5
PdfStamper
the page
can be any. The first page is 1.Parameters: placeInPage New value of property placeInPage.