|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectpdftron.PDF.Annot
public class Annot
Annot is a base class for different types of annotations. For annotation specific properties, please refer to derived classes. An annotation is an interactive object placed on a page, such as a text note, a link, or an embedded file. PDF includes a wide variety of standard annotation types. An annotation associates an object such as a widget, note, or movie with a location on a page of a PDF document, or provides a means of interacting with the user via the mouse and keyboard. For more details on PDF annotations please refer to section 12.5 in the PDF Reference Manual and the
| Nested Class Summary | |
|---|---|
static class |
Annot.BorderStyle
BorderStyle structure specifies the characteristics of the annotation’s border. |
| Field Summary | |
|---|---|
static int |
e_3D
The Constant e_3D. |
static int |
e_Caret
The Constant e_Caret. |
static int |
e_Circle
The Constant e_Circle. |
static int |
e_down
The Constant e_down. |
static int |
e_FileAttachment
The Constant e_FileAttachment. |
static int |
e_FreeText
The Constant e_FreeText. |
static int |
e_hidden
The Constant e_hidden. |
static int |
e_Highlight
The Constant e_Highlight. |
static int |
e_Ink
The Constant e_Ink. |
static int |
e_invisible
Flags specifying various characteristics of the annotation. |
static int |
e_Line
The Constant e_Line. |
static int |
e_Link
The Constant e_Link. |
static int |
e_locked
The Constant e_locked. |
static int |
e_locked_contents
The Constant e_locked_contents. |
static int |
e_Movie
The Constant e_Movie. |
static int |
e_no_rotate
The Constant e_no_rotate. |
static int |
e_no_view
The Constant e_no_view. |
static int |
e_no_zoom
The Constant e_no_zoom. |
static int |
e_normal
An annotation can define as many as three separate appearances: The normal appearance is used when the annotation is not interacting with the user. |
static int |
e_Polygon
The Constant e_Polygon. |
static int |
e_Polyline
The Constant e_Polyline. |
static int |
e_Popup
The Constant e_Popup. |
static int |
e_print
The Constant e_print. |
static int |
e_PrinterMark
The Constant e_PrinterMark. |
static int |
e_Projection
The Constant e_Projection. |
static int |
e_read_only
The Constant e_read_only. |
static int |
e_Redact
The Constant e_Redact. |
static int |
e_RichMedia
The Constant e_RichMedia. |
static int |
e_rollover
The Constant e_rollover. |
static int |
e_Screen
The Constant e_Screen. |
static int |
e_Sound
The Constant e_Sound. |
static int |
e_Square
The Constant e_Square. |
static int |
e_Squiggly
The Constant e_Squiggly. |
static int |
e_Stamp
The Constant e_Stamp. |
static int |
e_StrikeOut
The Constant e_StrikeOut. |
static int |
e_Text
PDF supports the standard annotation types listed in the following enumeration (plug-in extensions may add new annotation types):. |
static int |
e_toggle_no_view
The Constant e_toggle_no_view. |
static int |
e_TrapNet
The Constant e_TrapNet. |
static int |
e_Underline
The Constant e_Underline. |
static int |
e_Unknown
The Constant e_Unknown. |
static int |
e_Watermark
The Constant e_Watermark. |
static int |
e_Widget
The Constant e_Widget. |
| Constructor Summary | |
|---|---|
Annot()
Create an empty annotation. |
|
Annot(Obj d)
Create an annotation and initialize it using given Cos/SDF object. |
|
| Method Summary | |
|---|---|
static Annot |
__Create(long impl,
java.lang.Object ref)
|
long |
__GetHandle()
|
java.lang.Object |
__GetRefHandle()
|
static Annot |
create(Doc doc,
int type,
Rect pos)
Creates a new annotation of a given type, in the specified document. |
boolean |
equals(java.lang.Object d)
Compares two annotations for equality. |
void |
flatten(Page page)
Flatten/Merge the existing annotation appearances with the page content and delete this annotation from a given page. |
java.lang.String |
getActiveAppearanceState()
Get the annotation’s active appearance state. |
Obj |
getAppearance()
Get the annotation’s appearance for the given combination of annotation and appearance states. |
Obj |
getAppearance(int annot_state)
Get the annotation’s appearance for the given combination of annotation and appearance states. |
Obj |
getAppearance(int annot_state,
java.lang.String app_state)
Get the annotation’s appearance for the given combination of annotation and appearance states. |
Annot.BorderStyle |
getBorderStyle()
Get the border style for the annotation. |
ColorPt |
getColorAsCMYK()
Get an annotation's color. |
ColorPt |
getColorAsGray()
Get an annotation's color. |
ColorPt |
getColorAsRGB()
Get an annotation's color. |
int |
getColorCompNum()
Get the color space the annotation's color is represented in. |
java.lang.String |
getContents()
Get the annotation contents. |
Date |
getDate()
Get annotation's date. |
boolean |
getFlag(int flag)
Determine if the give flag is marked flagged |
Obj |
getOptionalContent()
Get optional content of an annotation. |
Page |
getPage()
Get the page the annotation is associated with. |
Rect |
getRect()
Get annoation bound rectangle |
Obj |
getSDFObj()
Get the SDFObj. |
int |
GetStructParent()
Get the struct parent of an annotation. |
int |
getType()
Get the annotation type. |
Obj |
getUniqueID()
Get the annotiation unique ID. |
boolean |
isMarkup()
Checks if annoation is markup. |
boolean |
isValid()
Checks if Annot is valid. |
void |
refreshAppearance()
Regenerates the appearance stream for the annotation. |
void |
removeAppearance(int annot_state,
java.lang.String app_state)
Removes the annotation's appearance for the given combination of annotation and appearance states. |
void |
resize(Rect pos)
Resize annotation |
void |
setActiveAppearanceState(java.lang.String astate)
Set the annotation’s active appearance state. |
void |
setAppearance(Obj app_stream)
Set the annotation’s appearance for the given combination of annotation and appearance states. |
void |
setAppearance(Obj app_stream,
int annot_state)
Set the annotation’s appearance for the given combination of annotation and appearance states. |
void |
setAppearance(Obj app_stream,
int annot_state,
java.lang.String app_state)
Set the annotation’s appearance for the given combination of annotation and appearance states. |
void |
setBorderStyle(Annot.BorderStyle bs)
Set the border style for the annotation. |
void |
setColor(ColorPt cpt,
int comp_num)
Set an annotation's color. |
void |
setContents(java.lang.String ct)
Set annotation contents. |
void |
setDate(Date date)
Set an annotation's date. |
void |
setFlag(int flag,
boolean value)
Set the value of given Flag. |
void |
setOptionalContent(Obj oc)
Set optional content of an annotation. |
void |
setPage(Page page)
Set the reference to a page the annotation is associated with. |
void |
setRect(Rect pos)
Set the size and location of an annotation on its page. |
void |
setStructParent(int keyval)
Set the struct parent of an annotation. |
void |
setUniqueID(java.lang.String icon_name)
Set the unique identifier for this annotation. |
| Methods inherited from class java.lang.Object |
|---|
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int e_Text
public static final int e_Link
public static final int e_FreeText
public static final int e_Line
public static final int e_Square
public static final int e_Circle
public static final int e_Polygon
public static final int e_Polyline
public static final int e_Highlight
public static final int e_Underline
public static final int e_Squiggly
public static final int e_StrikeOut
public static final int e_Stamp
public static final int e_Caret
public static final int e_Ink
public static final int e_Popup
public static final int e_FileAttachment
public static final int e_Sound
public static final int e_Movie
public static final int e_Widget
public static final int e_Screen
public static final int e_PrinterMark
public static final int e_TrapNet
public static final int e_Watermark
public static final int e_3D
public static final int e_Redact
public static final int e_Projection
public static final int e_RichMedia
public static final int e_Unknown
public static final int e_invisible
public static final int e_hidden
public static final int e_print
public static final int e_no_zoom
public static final int e_no_rotate
public static final int e_no_view
public static final int e_read_only
public static final int e_locked
public static final int e_toggle_no_view
public static final int e_locked_contents
public static final int e_normal
public static final int e_rollover
public static final int e_down
| Constructor Detail |
|---|
public Annot(Obj d)
d - the dpublic Annot()
| Method Detail |
|---|
public static Annot create(Doc doc,
int type,
Rect pos)
throws PDFNetException
doc - A document to which the annotation is added.type - Subtype of annotation to create.pos - A rectangle specifying the annotation's bounds, specified in
user space coordinates.
PDFNetExceptionpublic boolean equals(java.lang.Object d)
equals in class java.lang.Objectd - the other annotation
public boolean isValid()
throws PDFNetException
PDFNetException
public Obj getSDFObj()
throws PDFNetException
PDFNetException
public int getType()
throws PDFNetException
PDFNetException
public boolean isMarkup()
throws PDFNetException
PDFNetException
public java.lang.String getContents()
throws PDFNetException
PDFNetException
public void setContents(java.lang.String ct)
throws PDFNetException
ct - the new contents
PDFNetException
public Rect getRect()
throws PDFNetException
PDFNetException
public void setRect(Rect pos)
throws PDFNetException
pos - the new bound rectangle
PDFNetException
public Page getPage()
throws PDFNetException
PDFNetException
public void setPage(Page page)
throws PDFNetException
page - the new page
PDFNetException
public Obj getUniqueID()
throws PDFNetException
PDFNetException
public void setUniqueID(java.lang.String icon_name)
throws PDFNetException
icon_name - the new unique id
PDFNetException
public Date getDate()
throws PDFNetException
PDFNetException
public void setDate(Date date)
throws PDFNetException
date - the new date
PDFNetException
public boolean getFlag(int flag)
throws PDFNetException
flag - The Flag property to query.
PDFNetException
public void setFlag(int flag,
boolean value)
throws PDFNetException
flag - The Flag property to modify.value - The new value for the property.
PDFNetException
public Annot.BorderStyle getBorderStyle()
throws PDFNetException
PDFNetException
public void setBorderStyle(Annot.BorderStyle bs)
throws PDFNetException
bs - New border style for this annotation.
PDFNetException
public Obj getAppearance()
throws PDFNetException
PDFNetException
public Obj getAppearance(int annot_state)
throws PDFNetException
annot_state - The annotation’s appearance state, which selects the applicable
appearance stream from the appearance sub-dictionary. An annotation can define as many
as three separate appearances: The normal, rollover, and down appearance.
PDFNetException
public Obj getAppearance(int annot_state,
java.lang.String app_state)
throws PDFNetException
annot_state - The annotation’s appearance state, which selects the applicable
appearance stream from the appearance sub-dictionary. An annotation can define as many
as three separate appearances: The normal, rollover, and down appearance.app_state - Is an optional parameter specifying the appearance state
to look for (e.g. "Off", "On", etc). If appearance_state is NULL, the choice
between different appearance states is determined by the AS (Appearance State)
entry in the annotation dictionary.
PDFNetException
public void setAppearance(Obj app_stream)
throws PDFNetException
app_stream - a content stream defining the new appearance.
PDFNetException
public void removeAppearance(int annot_state,
java.lang.String app_state)
throws PDFNetException
annot_state - the annotation's appearance state, which selects the applicable
appearance stream from the appearance sub-dictionary. An annotation can define as many
as three separate appearances: The normal, rollover, and down appearance.app_state - is an optional parameter specifying the appearance state
(e.g. "Off", "On", etc) under which the new appearance should be stored. If
appearance_state is NULL, the annotation will have only one annotaion state.
PDFNetException
public void setAppearance(Obj app_stream,
int annot_state)
throws PDFNetException
app_stream - a content stream defining the new appearance.annot_state - the annotation’s appearance state, which selects the applicable
appearance stream from the appearance sub-dictionary. An annotation can define as many
as three separate appearances: The normal, rollover, and down appearance.
PDFNetException
public void setAppearance(Obj app_stream,
int annot_state,
java.lang.String app_state)
throws PDFNetException
app_stream - a content stream defining the new appearance.annot_state - the annotation’s appearance state, which selects the applicable
appearance stream from the appearance sub-dictionary. An annotation can define as many
as three separate appearances: The normal, rollover, and down appearance.app_state - is an optional parameter specifying the appearance state
(e.g. "Off", "On", etc) under which the new appearance should be stored. If
appearance_state is NULL, the annotation will have only one annotaion state.
PDFNetException
public void flatten(Page page)
throws PDFNetException
page - the page
PDFNetException
public java.lang.String getActiveAppearanceState()
throws PDFNetException
PDFNetException
public void setActiveAppearanceState(java.lang.String astate)
throws PDFNetException
astate - the new active appearance state
PDFNetException
public ColorPt getColorAsRGB()
throws PDFNetException
PDFNetException
public ColorPt getColorAsCMYK()
throws PDFNetException
PDFNetException
public ColorPt getColorAsGray()
throws PDFNetException
PDFNetException
public int getColorCompNum()
throws PDFNetException
PDFNetException
public void setColor(ColorPt cpt,
int comp_num)
throws PDFNetException
cpt - the cptcomp_num - The color component number that indirectly implies the color space the color is from.
PDFNetException
public int GetStructParent()
throws PDFNetException
PDFNetException
public void setStructParent(int keyval)
throws PDFNetException
keyval - An integer which is the integer key of the
annotation’s entry in the structural parent tree.
PDFNetException
public Obj getOptionalContent()
throws PDFNetException
PDFNetException
public void setOptionalContent(Obj oc)
throws PDFNetException
oc - An SDF object corresponding to the optional content,
a PDF::OCG::Group or membership dictionary specifying the PDF::OCG::Group properties for
the annotation. Before the annotation is drawn, its visibility
shall be determined based on this entry as well as the annotation
flags specified in the Flag entry . If it is determined to be invisible,
the annotation shall be skipped, as if it were not in the document.
PDFNetException
public void refreshAppearance()
throws PDFNetException
PDFNetException
public void resize(Rect pos)
throws PDFNetException
pos - size to resize to
PDFNetException
public static Annot __Create(long impl,
java.lang.Object ref)
public long __GetHandle()
public java.lang.Object __GetRefHandle()
|
© 2002-2011 PDFTron Systems Inc. |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||