public class Markup extends Annot
Annot.BorderStyle
Modifier and Type | Field and Description |
---|---|
static int |
e_Cloudy
The Constant e_Cloudy.
|
static int |
e_None
This integer list represents the Border Effect of the Markup annotation
e_None - No effect
e_Cloudy - The border should appear "cloudy".
|
e_3D, e_action_trigger_activate, e_action_trigger_annot_blur, e_action_trigger_annot_down, e_action_trigger_annot_enter, e_action_trigger_annot_exit, e_action_trigger_annot_focus, e_action_trigger_annot_page_close, e_action_trigger_annot_page_invisible, e_action_trigger_annot_page_open, e_action_trigger_annot_page_visible, e_action_trigger_annot_up, e_Caret, e_Circle, e_down, e_FileAttachment, e_FreeText, e_hidden, e_Highlight, e_Ink, e_invisible, e_Line, e_Link, e_locked, e_locked_contents, e_Movie, e_no_rotate, e_no_view, e_no_zoom, e_normal, e_Polygon, e_Polyline, e_Popup, e_print, e_PrinterMark, e_Projection, e_read_only, e_Redact, e_RichMedia, e_rollover, e_Screen, e_Sound, e_Square, e_Squiggly, e_Stamp, e_StrikeOut, e_Text, e_toggle_no_view, e_TrapNet, e_Underline, e_Unknown, e_Watermark, e_Widget
Constructor and Description |
---|
Markup()
Creates an empty Markup annotation.
|
Markup(Annot annot)
Creates a Markup annotation and initialize it using given annotation object.
|
Markup(Obj d)
Creates a Markup annotation and initialize it using given Cos/SDF object.
|
Modifier and Type | Method and Description |
---|---|
int |
getBorderEffect()
Get the Border Effect of the Markup Annotation.
|
double |
getBorderEffectIntensity()
Get the Border Effect Intensity of the Markup Annotation.
|
Rect |
getContentRect()
Get the inner bounding rectangle of the Square.
|
Date |
getCreationDates()
Get the creation date of the Markup Annotation.
|
ColorPt |
getInteriorColor()
Get the interior color of the Square.
|
int |
getInteriorColorCompNum()
Get the number indicating interior color space of the Square.
|
double |
getOpacity()
Get the contant opacity value corresponding to the annotation.
|
Rect |
getPadding()
Get the rectangle difference of the Square.
|
Popup |
getPopup()
Get the Popup object associated with this Markup annotation.
|
java.lang.String |
getSubject()
Get subject of the Markup Annotation.
|
java.lang.String |
getTitle()
Get the title of the Markup Annotation.
|
void |
setBorderEffect(int effect)
Set the Border Effect of the Markup Annotation.
|
void |
SetBorderEffectIntensity(double intensity)
Set the Border Effect Intensity of the Markup Annotation.
|
void |
setContentRect(Rect cr)
Set the inner bounding rectangle of the Square.
|
void |
setCreationDates(Date date)
Set the creation date of the Markup Annotation.
|
void |
setInteriorColor(ColorPt cpt,
int comp_num)
Set the interior color of the Square.
|
void |
setOpacity(double opacity)
Set the contant opacity value corresponding to the annotation.
|
void |
SetPadding(Rect rd)
Set the rectangle difference of the Square.
|
void |
setPopup(Popup popup)
Set the Popup object associated with this Markup annotation.
|
void |
setSubject(java.lang.String title)
Set subject of the Markup Annotation.
|
void |
setTitle(java.lang.String title)
Set the title of the Markup Annotation.
|
__Create, __GetHandle, __GetRefHandle, create, equals, flatten, getActiveAppearanceState, getAppearance, getAppearance, getAppearance, getBorderStyle, getColorAsCMYK, getColorAsGray, getColorAsRGB, getColorCompNum, getContents, getDate, getFlag, getOptionalContent, getPage, getRect, getRotation, getSDFObj, GetStructParent, getTriggerAction, getType, getUniqueID, getVisibleContentBox, isMarkup, isValid, refreshAppearance, removeAppearance, resize, setActiveAppearanceState, setAppearance, setAppearance, setAppearance, setBorderStyle, setColor, setContents, setDate, setFlag, setOptionalContent, setPage, setRect, setRotation, setStructParent, setUniqueID
public static final int e_None
public static final int e_Cloudy
public Markup(Obj d)
Note: The constructor does not copy any data, but is instead the logical equivalent of a type cast.
d
- the input Cos/SDF objectpublic Markup()
public Markup(Annot annot) throws PDFNetException
Note: The constructor does not copy any data, but is instead the logical equivalent of a type cast.
annot
- the annotPDFNetException
public java.lang.String getTitle() throws PDFNetException
Note: The title is The text label that shall be displayed in the title bar of the annotation's pop-up window when open and active. This entry shall identify the user who added the annotation.
PDFNetException
public void setTitle(java.lang.String title) throws PDFNetException
Note: The title is The text label that shall be displayed in the title bar of the annotation's pop-up window when open and active. This entry shall identify the user who added the annotation.
title
- A string representing the title of the Markup AnnotationPDFNetException
public Popup getPopup() throws PDFNetException
Note: The Popup is An indirect reference to a pop-up annotation for entering or editing the text associated with this annotation.
PDFNetException
public void setPopup(Popup popup) throws PDFNetException
Note: the Popup is An indirect reference to a pop-up annotation for entering or editing the text associated with this annotation.
popup
- the new popupPDFNetException
public double getOpacity() throws PDFNetException
Note: The constant opacity value shall be used in painting the annotation. This value shall apply to all visible elements of the annotation in its closed state (including its background and border) but not to the pop-up window that appears when the annotation is opened. The specified value shall not used if the annotation has an appearance stream in that case, the appearance stream shall specify any transparency. (However, if the compliant viewer regenerates the annotation's appearance stream, it may incorporate the CA value into the stream's content.) The implicit blend mode is Normal. Default value: 1.0. If no explicit appearance stream is defined for the annotation, it may bepainted by implementation-dependent means that do not necessarily conform to the PDF imaging model; in this case, the effect of this entry is implementation-dependent as well.
PDFNetException
public void setOpacity(double opacity) throws PDFNetException
Note: The constant opacity value shall be used in painting the annotation. This value shall apply to all visible elements of the annotation in its closed state (including its background and border) but not to the pop-up window that appears when the annotation is opened. The specified value shall not used if the annotation has an appearance stream in that case, the appearance stream shall specify any transparency. (However, if the compliant viewer regenerates the annotation's appearance stream, it may incorporate the CA value into the stream's content.) The implicit blend mode is Normal. Default value: 1.0. If no explicit appearance stream is defined for the annotation, it may bepainted by implementation-dependent means that do not necessarily conform to the PDF imaging model; in this case, the effect of this entry is implementation-dependent as well.
opacity
- the new opacityPDFNetException
public java.lang.String getSubject() throws PDFNetException
Note: The subject is The Text representing a short description of the subject being addressed by the annotation.
PDFNetException
public void setSubject(java.lang.String title) throws PDFNetException
Note: The subject is The Text representing a short description of the subject being addressed by the annotation.
title
- the new subjectPDFNetException
public Date getCreationDates() throws PDFNetException
Note: The Date object not only includes date, it actually includes both date and time when the annotation was created.
This corresponds to the 'CreationDate' field of the markup annotation's dictionary.
PDFNetException
public void setCreationDates(Date date) throws PDFNetException
Note: The Date object not only includes date, it actually includes both date and time when the annotation was created.
This corresponds to the 'CreationDate' field of the markup annotation's dictionary.
date
- the new creation datesPDFNetException
public int getBorderEffect() throws PDFNetException
Note: The BorderEffect value is an entry in the "BorderEffect" enum, representing the border effect to apply. Possible values are: e_None - No effect: the border shall be as described by the annotation dictionary's BorderStyle(BS) entry. e_Cloudy - The border should appear "cloudy". The width and dash array specified by BS shall be honored. Default value: e_None.
PDFNetException
public void setBorderEffect(int effect) throws PDFNetException
Note: The BorderEffect value is an entry in the "BorderEffect" enum, representing the border effect to apply. Possible values are: e_None - No effect: the border shall be as described by the annotation dictionary's BorderStyle(BS) entry. e_Cloudy - The border should appear "cloudy". The width and dash array specified by BS shall be honored. Default value: e_None.
effect
- An entry from the enum "BorderEffect" that
represents the border effect.PDFNetException
public double getBorderEffectIntensity() throws PDFNetException
Note: The BorderEffectIntensity value is a number describing the intensity of the effect, in the range 0 to 2. Default value: 0.
PDFNetException
public void SetBorderEffectIntensity(double intensity) throws PDFNetException
Note: The BorderEffectIntensity value is a number describing the intensity of the effect, in the range 0 to 2. Default value: 0.
intensity
- A number representing the border effect.PDFNetException
public ColorPt getInteriorColor() throws PDFNetException
Note: that the color can be in different color spaces: Gray, RGB, or CMYK. Call "GetInteriorColorCompNum" to access the color space information corresponding to the interioir color.
PDFNetException
public int getInteriorColorCompNum() throws PDFNetException
PDFNetException
public void setInteriorColor(ColorPt cpt, int comp_num) throws PDFNetException
Note: it is necessary to make sure the consistancy between the ColorPt type and the ColorSpace::Type value. e_device_gray corresponds to an array of two numbers; e_device_rgb corresponds to an array of 3 numbers, e_device_cmyk corresponds to an array of 4 numnbers, while e_null correspons to an arry of 0 number. Entries out of the specified color space array length will be desgarded. However, missing entries for a specified color space will throw exception either when setting the color or when later retrieving color(colorspace) information.
cpt
- the cptcomp_num
- the comp_numPDFNetException
public Rect getContentRect() throws PDFNetException
PDFNetException
public void setContentRect(Rect cr) throws PDFNetException
cr
- the new content rectPDFNetException
public Rect getPadding() throws PDFNetException
Note: rectangle difference is A set of four numbers that shall describe the numerical differences between two rectangles: the Rect entry of the annotation and the actual boundaries of the underlying square or Square. Such a difference may occur in situations where a border effect (described by BE) causes the size of the Rect to increase beyond that of the square or Square. The four numbers shall correspond to the differences in default user space between the left, top, right, and bottom coordinates of Rect and those of the square or Square, respectively. Each value shall be greater than or equal to 0. The sum of the top and bottom differences shall be less than the height of Rect, and the sum of the left and right differences shall be less than the width of Rect.
PDFNetException
public void SetPadding(Rect rd) throws PDFNetException
Note: rectangle difference is A set of four numbers that shall describe the numerical differences between two rectangles: the Rect entry of the annotation and the actual boundaries of the underlying square or Square. Such a difference may occur in situations where a border effect (described by BE) causes the size of the Rect to increase beyond that of the square or Square. The four numbers shall correspond to the differences in default user space between the left, top, right, and bottom coordinates of Rect and those of the square or Square, respectively. Each value shall be greater than or equal to 0. The sum of the top and bottom differences shall be less than the height of Rect, and the sum of the left and right differences shall be less than the width of Rect.
rd
- A set of four numbers(represented as a Rect object) specifying the difference on the four different directions.PDFNetException