public class PdfAnnotation extends PdfDictionary
PdfAnnotation is a note that is associated with a page.PdfDictionary| Modifier and Type | Field and Description |
|---|---|
protected boolean |
annotation |
static int |
FLAGS_PRINT
flagvalue
|
protected boolean |
form |
protected HashMap |
templates |
protected boolean |
used
Holds value of property used.
|
protected PdfWriter |
writer |
hashMap| Constructor and Description |
|---|
PdfAnnotation(PdfWriter writer,
float llx,
float lly,
float urx,
float ury,
PdfAction action)
Constructs a new
PdfAnnotation of subtype link (Action). |
PdfAnnotation(PdfWriter writer,
float llx,
float lly,
float urx,
float ury,
PdfString title,
PdfString content)
Constructs a new
PdfAnnotation of subtype text. |
| Modifier and Type | Method and Description |
|---|---|
static PdfAnnotation |
createScreen(PdfWriter writer,
Rectangle rect,
String clipTitle,
PdfFileSpecification fs,
String mimeType,
boolean playOnDisplay)
Creates a screen PdfAnnotation
|
PdfIndirectReference |
getIndirectReference()
Returns an indirect reference to the annotation
|
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 |
setAppearanceState(String state) |
void |
setBorder(com.aowagie.text.pdf.PdfBorderArray border) |
void |
setBorderStyle(com.aowagie.text.pdf.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 |
setMKAlternateCaption(String caption) |
void |
setMKAlternateIcon(PdfTemplate template) |
void |
setMKBackgroundColor(Color color) |
void |
setMKBorderColor(Color color) |
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 |
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.
|
get, getAsArray, getAsDict, getAsName, getAsNumber, getAsString, getDirectObject, getKeys, isCatalog, isFont, isOutlineTree, isPage, isPages, put, remove, size, toPdf, toStringgetBytes, getIndRef, isArray, isBoolean, isDictionary, isIndirect, isName, isNull, isNumber, isStream, isString, setContent, setIndRef, typepublic static final int FLAGS_PRINT
protected PdfWriter writer
protected HashMap templates
protected boolean form
protected boolean annotation
protected boolean used
public PdfAnnotation(PdfWriter writer, float llx, float lly, float urx, float ury, PdfString title, PdfString content)
PdfAnnotation of subtype text.writer - writer to putllx - position llx to putlly - position lly to puturx - position urx to putury - position ury to puttitle - title to putcontent - content to putpublic PdfAnnotation(PdfWriter writer, float llx, float lly, float urx, float ury, PdfAction action)
PdfAnnotation of subtype link (Action).writer - writer to putllx - position llx to putlly - position lly to puturx - position urx to putury - position ury to putaction - action to putpublic static PdfAnnotation createScreen(PdfWriter writer, Rectangle rect, String clipTitle, PdfFileSpecification fs, String mimeType, boolean playOnDisplay) throws IOException
writer - Writer to createrect - Rectangle to createclipTitle - Cliptitle to createfs - FileSpecification to createmimeType - Mimetype to setplayOnDisplay - PlayOnDisplay to setIOException - Exception of a I/Opublic PdfIndirectReference getIndirectReference()
public void setDefaultAppearanceString(PdfContentByte cb)
public void setFlags(int flags)
public void setBorder(com.aowagie.text.pdf.PdfBorderArray border)
public void setBorderStyle(com.aowagie.text.pdf.PdfBorderDictionary border)
public void setHighlighting(PdfName highlight)
HIGHLIGHT_NONE, HIGHLIGHT_INVERT,
HIGHLIGHT_OUTLINE and HIGHLIGHT_PUSH;highlight - the annotation's highlighting modepublic void setAppearanceState(String state)
public void setColor(Color color)
public void setTitle(String title)
public void setPopup(PdfAnnotation popup)
public void setAction(PdfAction action)
public boolean isUsed()
public void setUsed()
public HashMap getTemplates()
public boolean isForm()
public boolean isAnnotation()
public void setPage(int page)
public int getPlaceInPage()
public void setPlaceInPage(int placeInPage)
PdfStamper the page
can be any. The first page is 1.placeInPage - New value of property placeInPage.public void setRotate(int v)
public void setMKRotation(int rotation)
public void setMKBorderColor(Color color)
public void setMKBackgroundColor(Color color)
public void setMKNormalCaption(String caption)
public void setMKRolloverCaption(String caption)
public void setMKAlternateCaption(String caption)
public void setMKNormalIcon(PdfTemplate template)
public void setMKRolloverIcon(PdfTemplate template)
public void setMKAlternateIcon(PdfTemplate template)
public void setMKTextPosition(int tp)
public void setLayer(PdfOCG layer)
layer - the layer this annotation belongs topublic void setName(String name)
name - name to setCopyright © 2021. All rights reserved.