java.lang.Object
com.lowagie.text.pdf.PdfObject
com.lowagie.text.pdf.PdfDictionary
com.lowagie.text.pdf.PdfAnnotation
- Direct Known Subclasses:
PdfFormField
Deprecated.
A
PdfAnnotation is a note that is associated with a page.- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classDeprecated.This class processes links from imported pages so that they may be active. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final PdfNameDeprecated.attributevaluestatic final PdfNameDeprecated.attributevaluestatic final PdfNameDeprecated.attributevaluestatic final PdfNameDeprecated.attributevaluestatic final PdfNameDeprecated.attributevaluestatic final PdfNameDeprecated.attributevaluestatic final PdfNameDeprecated.attributevaluestatic final PdfNameDeprecated.attributevaluestatic final PdfNameDeprecated.attributevaluestatic final PdfNameDeprecated.attributevalueprotected booleanDeprecated.static final PdfNameDeprecated.appearance attributenamestatic final PdfNameDeprecated.appearance attributenamestatic final PdfNameDeprecated.appearance attributenamestatic final intDeprecated.flagvaluestatic final intDeprecated.flagvaluestatic final intDeprecated.flagvaluestatic final intDeprecated.flagvaluestatic final intDeprecated.flagvaluestatic final intDeprecated.flagvaluestatic final intDeprecated.flagvaluestatic final intDeprecated.flagvaluestatic final intDeprecated.flagvalueprotected booleanDeprecated.static final PdfNameDeprecated.highlight attributenamestatic final PdfNameDeprecated.highlight attributenamestatic final PdfNameDeprecated.highlight attributenamestatic final PdfNameDeprecated.highlight attributenamestatic final PdfNameDeprecated.highlight attributenamestatic final intDeprecated.attributevaluestatic final intDeprecated.attributevaluestatic final intDeprecated.attributevaluestatic final intDeprecated.attributevalueprotected PdfIndirectReferenceDeprecated.Reference to this annotation.protected Map<PdfTemplate, Object> Deprecated.protected booleanDeprecated.Holds value of property used.protected PdfWriterDeprecated. -
Constructor Summary
ConstructorsConstructorDescriptionPdfAnnotation(PdfWriter writer, float llx, float lly, float urx, float ury, PdfAction action) Deprecated.Constructs a newPdfAnnotationof subtype link (Action).PdfAnnotation(PdfWriter writer, float llx, float lly, float urx, float ury, PdfString title, PdfString content) Deprecated.Constructs a newPdfAnnotationof subtype text.PdfAnnotation(PdfWriter writer, Rectangle rect) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionintaddFlags(int flags) Deprecated.Adds one or more flag(s) to the existing annotation flagsstatic PdfAnnotationcreateFileAttachment(PdfWriter writer, Rectangle rect, String contents, byte[] fileStore, String file, String fileDisplay) Deprecated.Creates a file attachment annotation.static PdfAnnotationcreateFileAttachment(PdfWriter writer, Rectangle rect, String contents, PdfFileSpecification fs) Deprecated.Creates a file attachment annotationstatic PdfAnnotationcreateFreeText(PdfWriter writer, Rectangle rect, String contents, PdfContentByte defaultAppearance) Deprecated.Add some free text to the document.static PdfAnnotationDeprecated.static PdfAnnotationcreateLine(PdfWriter writer, Rectangle rect, String contents, float x1, float y1, float x2, float y2) Deprecated.Adds a line to the document.protected static PdfAnnotationcreateLink(PdfWriter writer, Rectangle rect, PdfName highlight) Deprecated.Creates a link.static PdfAnnotationcreateLink(PdfWriter writer, Rectangle rect, PdfName highlight, int page, PdfDestination dest) Deprecated.Creates an Annotation with a PdfDestination.static PdfAnnotationcreateLink(PdfWriter writer, Rectangle rect, PdfName highlight, PdfAction action) Deprecated.Creates an Annotation with an Action.static PdfAnnotationcreateLink(PdfWriter writer, Rectangle rect, PdfName highlight, String namedDestination) Deprecated.Creates an Annotation with an local destination.static PdfAnnotationcreateMarkup(PdfWriter writer, Rectangle rect, String contents, int type, float[] quadPoints) Deprecated.static PdfAnnotationcreatePopup(PdfWriter writer, Rectangle rect, String contents, boolean open) Deprecated.Adds a popup to your document.static PdfAnnotationcreateScreen(PdfWriter writer, Rectangle rect, String clipTitle, PdfFileSpecification fs, String mimeType, boolean playOnDisplay) Deprecated.Creates a screen PdfAnnotationstatic PdfAnnotationcreateSquareCircle(PdfWriter writer, Rectangle rect, String contents, boolean square) Deprecated.Adds a circle or a square that shows a tooltip when you pass over it.static PdfAnnotationcreateStamp(PdfWriter writer, Rectangle rect, String contents, String name) Deprecated.Adds a Stamp to your document.static PdfAnnotationcreateText(PdfWriter writer, Rectangle rect, String title, String contents, boolean open, String icon) Deprecated.Deprecated.Returns an indirect reference to the annotationstatic PdfArraygetMKColor(Color color) Deprecated.intDeprecated.Getter for property placeInPage.Deprecated.booleanDeprecated.Getter for property annotation.booleanisForm()Deprecated.Getter for property form.booleanisUsed()Deprecated.Getter for property used.voidDeprecated.voidsetAdditionalActions(PdfName key, PdfAction action) Deprecated.voidsetAppearance(PdfName ap, PdfTemplate template) Deprecated.voidsetAppearance(PdfName ap, String state, PdfTemplate template) Deprecated.voidsetAppearanceState(String state) Deprecated.voidsetBorder(PdfBorderArray border) Deprecated.voidsetBorderStyle(PdfBorderDictionary border) Deprecated.voidDeprecated.voidDeprecated.voidsetFlags(int flags) Deprecated.voidsetHighlighting(PdfName highlight) Deprecated.Sets the annotation's highlighting mode.voidDeprecated.Sets the layer this annotation belongs to.voidsetMKAlternateCaption(String caption) Deprecated.voidsetMKAlternateIcon(PdfTemplate template) Deprecated.voidsetMKBackgroundColor(Color color) Deprecated.voidsetMKBorderColor(Color color) Deprecated.voidsetMKIconFit(PdfName scale, PdfName scalingType, float leftoverLeft, float leftoverBottom, boolean fitInBounds) Deprecated.voidsetMKNormalCaption(String caption) Deprecated.voidsetMKNormalIcon(PdfTemplate template) Deprecated.voidsetMKRolloverCaption(String caption) Deprecated.voidsetMKRolloverIcon(PdfTemplate template) Deprecated.voidsetMKRotation(int rotation) Deprecated.voidsetMKTextPosition(int tp) Deprecated.voidDeprecated.Sets the name of the annotation.voidsetPage()Deprecated.voidsetPage(int page) Deprecated.voidsetPlaceInPage(int placeInPage) Deprecated.Places the annotation in a specified page that must be greater or equal to the current one.voidsetPopup(PdfAnnotation popup) Deprecated.voidsetRotate(int v) Deprecated.voidDeprecated.voidsetUsed()Deprecated.Setter for property used.Methods inherited from class com.lowagie.text.pdf.PdfDictionary
clear, contains, get, getAsArray, getAsBoolean, getAsDict, getAsIndirectObject, getAsName, getAsNumber, getAsStream, getAsString, getDirectObject, getKeys, getKeysAndValues, isCatalog, isFont, isOutlineTree, isPage, isPages, merge, mergeDifferent, put, putAll, putEx, remove, size, toPdf, toStringMethods inherited from class com.lowagie.text.pdf.PdfObject
canBeInObjStm, getBytes, getIndRef, isArray, isBoolean, isDictionary, isIndirect, isName, isNull, isNumber, isStream, isString, length, setContent, setIndRef, type
-
Field Details
-
HIGHLIGHT_NONE
Deprecated.highlight attributename -
HIGHLIGHT_INVERT
Deprecated.highlight attributename -
HIGHLIGHT_OUTLINE
Deprecated.highlight attributename -
HIGHLIGHT_PUSH
Deprecated.highlight attributename -
HIGHLIGHT_TOGGLE
Deprecated.highlight attributename -
FLAGS_INVISIBLE
public static final int FLAGS_INVISIBLEDeprecated.flagvalue- See Also:
-
FLAGS_HIDDEN
public static final int FLAGS_HIDDENDeprecated.flagvalue- See Also:
-
FLAGS_PRINT
public static final int FLAGS_PRINTDeprecated.flagvalue- See Also:
-
FLAGS_NOZOOM
public static final int FLAGS_NOZOOMDeprecated.flagvalue- See Also:
-
FLAGS_NOROTATE
public static final int FLAGS_NOROTATEDeprecated.flagvalue- See Also:
-
FLAGS_NOVIEW
public static final int FLAGS_NOVIEWDeprecated.flagvalue- See Also:
-
FLAGS_READONLY
public static final int FLAGS_READONLYDeprecated.flagvalue- See Also:
-
FLAGS_LOCKED
public static final int FLAGS_LOCKEDDeprecated.flagvalue- See Also:
-
FLAGS_TOGGLENOVIEW
public static final int FLAGS_TOGGLENOVIEWDeprecated.flagvalue- See Also:
-
APPEARANCE_NORMAL
Deprecated.appearance attributename -
APPEARANCE_ROLLOVER
Deprecated.appearance attributename -
APPEARANCE_DOWN
Deprecated.appearance attributename -
AA_ENTER
Deprecated.attributevalue -
AA_EXIT
Deprecated.attributevalue -
AA_DOWN
Deprecated.attributevalue -
AA_UP
Deprecated.attributevalue -
AA_FOCUS
Deprecated.attributevalue -
AA_BLUR
Deprecated.attributevalue -
AA_JS_KEY
Deprecated.attributevalue -
AA_JS_FORMAT
Deprecated.attributevalue -
AA_JS_CHANGE
Deprecated.attributevalue -
AA_JS_OTHER_CHANGE
Deprecated.attributevalue -
MARKUP_HIGHLIGHT
public static final int MARKUP_HIGHLIGHTDeprecated.attributevalue- See Also:
-
MARKUP_UNDERLINE
public static final int MARKUP_UNDERLINEDeprecated.attributevalue- See Also:
-
MARKUP_STRIKEOUT
public static final int MARKUP_STRIKEOUTDeprecated.attributevalue- See Also:
-
MARKUP_SQUIGGLY
public static final int MARKUP_SQUIGGLYDeprecated.attributevalue- Since:
- 2.1.3
- See Also:
-
writer
Deprecated. -
reference
Deprecated.Reference to this annotation.- Since:
- 2.1.6; was removed in 2.1.5, but restored in 2.1.6
-
templates
Deprecated. -
form
protected boolean formDeprecated. -
annotation
protected boolean annotationDeprecated. -
used
protected boolean usedDeprecated.Holds value of property used.
-
-
Constructor Details
-
PdfAnnotation
Deprecated. -
PdfAnnotation
public PdfAnnotation(PdfWriter writer, float llx, float lly, float urx, float ury, PdfString title, PdfString content) Deprecated.Constructs a newPdfAnnotationof subtype text.- Parameters:
writer- pdf writerllx- lower-left-xlly- lower-left-yurx- upper-right-xury- upper-right-ytitle- titlecontent- content
-
PdfAnnotation
public PdfAnnotation(PdfWriter writer, float llx, float lly, float urx, float ury, PdfAction action) Deprecated.Constructs a newPdfAnnotationof subtype link (Action).- Parameters:
writer- pdf writerllx- lower-left-xlly- lower-left-yurx- upper-right-xury- upper-right-yaction-PdfAction
-
-
Method Details
-
createScreen
public static PdfAnnotation createScreen(PdfWriter writer, Rectangle rect, String clipTitle, PdfFileSpecification fs, String mimeType, boolean playOnDisplay) throws IOException Deprecated.Creates a screen PdfAnnotation- Parameters:
writer-PdfWriterrect- dimensionsRectangleclipTitle- clip titlefs-PdfFileSpecificationmimeType- mime type of the fileplayOnDisplay- play on display- Returns:
- a screen PdfAnnotation
- Throws:
IOException- on error
-
createText
public static PdfAnnotation createText(PdfWriter writer, Rectangle rect, String title, String contents, boolean open, String icon) Deprecated. -
createLink
Deprecated.Creates a link. -
createLink
public static PdfAnnotation createLink(PdfWriter writer, Rectangle rect, PdfName highlight, PdfAction action) Deprecated.Creates an Annotation with an Action. -
createLink
public static PdfAnnotation createLink(PdfWriter writer, Rectangle rect, PdfName highlight, String namedDestination) Deprecated.Creates an Annotation with an local destination. -
createLink
public static PdfAnnotation createLink(PdfWriter writer, Rectangle rect, PdfName highlight, int page, PdfDestination dest) Deprecated.Creates an Annotation with a PdfDestination. -
createFreeText
public static PdfAnnotation createFreeText(PdfWriter writer, Rectangle rect, String contents, PdfContentByte defaultAppearance) Deprecated.Add some free text to the document.- Parameters:
writer- pdf writerrect- dimensioncontents- content of free textdefaultAppearance- default appearance- Returns:
- A PdfAnnotation
-
createLine
public static PdfAnnotation createLine(PdfWriter writer, Rectangle rect, String contents, float x1, float y1, float x2, float y2) Deprecated.Adds a line to the document. Move over the line and a tooltip is shown. -
createSquareCircle
public static PdfAnnotation createSquareCircle(PdfWriter writer, Rectangle rect, String contents, boolean square) Deprecated.Adds a circle or a square that shows a tooltip when you pass over it.- Parameters:
writer- pdf writerrect- dimension of the tooltipcontents- The tooltipsquare- true if you want a square, false if you want a circle- Returns:
- A PdfAnnotation
-
createMarkup
public static PdfAnnotation createMarkup(PdfWriter writer, Rectangle rect, String contents, int type, float[] quadPoints) Deprecated. -
createStamp
public static PdfAnnotation createStamp(PdfWriter writer, Rectangle rect, String contents, String name) Deprecated.Adds a Stamp to your document. Move over the stamp and a tooltip is shown -
createInk
public static PdfAnnotation createInk(PdfWriter writer, Rectangle rect, String contents, float[][] inkList) Deprecated. -
createFileAttachment
public static PdfAnnotation createFileAttachment(PdfWriter writer, Rectangle rect, String contents, byte[] fileStore, String file, String fileDisplay) throws IOException Deprecated.Creates a file attachment annotation.- Parameters:
writer- thePdfWriterrect- the dimensions in the page of the annotationcontents- the file descriptionfileStore- an array with the file. If it'snullthe file will be read from the diskfile- the path to the file. It will only be used iffileStoreis notnullfileDisplay- the actual file name stored in the pdf- Returns:
- the annotation
- Throws:
IOException- on error
-
createFileAttachment
public static PdfAnnotation createFileAttachment(PdfWriter writer, Rectangle rect, String contents, PdfFileSpecification fs) throws IOException Deprecated.Creates a file attachment annotation- Parameters:
writer-PdfWriterrect- dimensionsRectanglecontents- content for the filefs-PdfFileSpecification- Returns:
- the annotation
- Throws:
IOException- on error
-
createPopup
public static PdfAnnotation createPopup(PdfWriter writer, Rectangle rect, String contents, boolean open) Deprecated.Adds a popup to your document. -
getMKColor
Deprecated. -
getIndirectReference
Deprecated.Returns an indirect reference to the annotation- Returns:
- the indirect reference
-
setDefaultAppearanceString
Deprecated. -
setFlags
public void setFlags(int flags) Deprecated. -
addFlags
public int addFlags(int flags) Deprecated.Adds one or more flag(s) to the existing annotation flags- Parameters:
flags- value to be added- Returns:
- int the new flag value
-
setBorder
Deprecated. -
setBorderStyle
Deprecated. -
setHighlighting
Deprecated.Sets the annotation's highlighting mode. The values can beHIGHLIGHT_NONE,HIGHLIGHT_INVERT,HIGHLIGHT_OUTLINEandHIGHLIGHT_PUSH;- Parameters:
highlight- the annotation's highlighting mode
-
setAppearance
Deprecated. -
setAppearance
Deprecated. -
setAppearanceState
Deprecated. -
setColor
Deprecated. -
setTitle
Deprecated. -
setPopup
Deprecated. -
setAction
Deprecated. -
setAdditionalActions
Deprecated. -
isUsed
public boolean isUsed()Deprecated.Getter for property used.- Returns:
- Value of property used.
-
setUsed
public void setUsed()Deprecated.Setter for property used. -
getTemplates
Deprecated. -
isForm
public boolean isForm()Deprecated.Getter for property form.- Returns:
- Value of property form.
-
isAnnotation
public boolean isAnnotation()Deprecated.Getter for property annotation.- Returns:
- Value of property annotation.
-
setPage
public void setPage(int page) Deprecated. -
setPage
public void setPage()Deprecated. -
getPlaceInPage
public int getPlaceInPage()Deprecated.Getter for property placeInPage.- Returns:
- Value of property placeInPage.
-
setPlaceInPage
public void setPlaceInPage(int placeInPage) Deprecated.Places the annotation in a specified page that must be greater or equal to the current one. WithPdfStamperthe page can be any. The first page is 1.- Parameters:
placeInPage- New value of property placeInPage.
-
setRotate
public void setRotate(int v) Deprecated. -
setMKRotation
public void setMKRotation(int rotation) Deprecated. -
setMKBorderColor
Deprecated. -
setMKBackgroundColor
Deprecated. -
setMKNormalCaption
Deprecated. -
setMKRolloverCaption
Deprecated. -
setMKAlternateCaption
Deprecated. -
setMKNormalIcon
Deprecated. -
setMKRolloverIcon
Deprecated. -
setMKAlternateIcon
Deprecated. -
setMKIconFit
public void setMKIconFit(PdfName scale, PdfName scalingType, float leftoverLeft, float leftoverBottom, boolean fitInBounds) Deprecated. -
setMKTextPosition
public void setMKTextPosition(int tp) Deprecated. -
setLayer
Deprecated.Sets the layer this annotation belongs to.- Parameters:
layer- the layer this annotation belongs to
-
setName
Deprecated.Sets the name of the annotation. With this name the annotation can be identified among all the annotations on a page (it has to be unique).- Parameters:
name- name to be set for annotation
-