public class Redaction extends Markup
Annot.BorderStyle
Modifier and Type | Field and Description |
---|---|
static int |
e_Centered
The Constant e_Centered.
|
static int |
e_LeftJustified
This integer list represents the Quad Format of the Redaction annotation
e_LeftJustified - Overlay text is left justified
e_Centered - Overlay text is centered
e_RightJustified - Overlay text is right justified
e_None - No justification to the overlay text.
|
static int |
e_None
The Constant e_None.
|
static int |
e_RightJustified
The Constant e_RightJustified.
|
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 |
---|
Redaction()
Creates an empty Redaction annotation.
|
Redaction(Annot annot)
Creates an Redaction annotation and initialize it using given annotation object.
|
Redaction(Obj d)
Creates an Redaction annotation and initialize it using given Cos/SDF object.
|
Modifier and Type | Method and Description |
---|---|
static Redaction |
create(Doc doc,
Rect pos)
Creates a new Redaction annotation, in the specified document.
|
Obj |
getAppFormXO()
Get Overlay appearance of the Redaction annotation.
|
java.lang.String |
getOverlayText()
Get Overlay text of the Redaction annotation.
|
java.lang.String |
getOverlayTextAppearance()
Get Overlay text appearance of the Redaction annotation.
|
int |
getQuadForm()
Get Overlay text quadding(justification) format of the Redaction annotation.
|
QuadPoint |
getQuadPoint(int idx)
Get the QuadPoint located at a certain index of the QuadPoint array of the Redaction
annotation.
|
int |
getQuadPointCount()
Get the number of QuadPoints in the QuadPoints array of the Redaction annotation.
|
boolean |
getUseRepeat()
Get the option of whether to use repeat for the Redaction annotation.
|
void |
setAppFormXO(Obj formxo)
Set Overlay appearance of the Redaction annotation.
|
void |
setOverlayText(java.lang.String title)
Set Overlay text of the Redaction annotation.
|
void |
setOverlayTextAppearance(java.lang.String app)
Set Overlay text appearance of the Redaction annotation.
|
void |
setQuadForm(int form)
Set Overlay text quadding(justification) format of the Redaction annotation.
|
void |
setQuadPoint(int idx,
QuadPoint qp)
Set the QuadPoint to be located at a certain index of the QuadPoint array of the Redaction
annotation.
|
void |
setUseRepeat(boolean repeat)
Set the option of whether to use repeat for the Redaction annotation.
|
getBorderEffect, getBorderEffectIntensity, getContentRect, getCreationDates, getInteriorColor, getInteriorColorCompNum, getOpacity, getPadding, getPopup, getSubject, getTitle, setBorderEffect, SetBorderEffectIntensity, setContentRect, setCreationDates, setInteriorColor, setOpacity, SetPadding, setPopup, setSubject, setTitle
__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_LeftJustified
public static final int e_Centered
public static final int e_RightJustified
public static final int e_None
public Redaction(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 Redaction()
public Redaction(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 static Redaction create(Doc doc, Rect pos) throws PDFNetException
doc
- A document to which the annotation is added.pos
- A rectangle specifying the annotation's bounds, specified in
user space coordinates.PDFNetException
public int getQuadPointCount() throws PDFNetException
Note: An array of n QuadPoints specifying If present, these quadrilaterals denote the content region that is intended to be removed. If this entry is not present, the Rect entry denotes the content region that is intended to be removed
PDFNetException
public QuadPoint getQuadPoint(int idx) throws PDFNetException
Note: An array of n QuadPoints specifying If present, these quadrilaterals denote the content region that is intended to be removed. If this entry is not present, the Rect entry denotes the content region that is intended to be removed
idx
- The index of where the QuadPoint of interest is located.PDFNetException
public void setQuadPoint(int idx, QuadPoint qp) throws PDFNetException
Note: An array of n QuadPoints specifying the coordinates of n quadrilaterals in default user space that comprise the region in which the link should be activated. The coordinates specifying the four vertices of the quadrilateral in counterclockwise order. For orientation purposes, such as when applying an underline border style, the bottom of a quadrilateral is the line formed by p1 and p2 of the QuadPoint. QuadPoints shall be ignored if any coordinate in the array lies outside the region specified by Rect.
idx
- The index position where the QuadPoint of interest is to be inserted.qp
- The QuadPoint to be inserted at that position.PDFNetException
public Obj getAppFormXO() throws PDFNetException
Note: This overlay overlay appearance object is a form XObject specifying the overlay appearance for this redaction annotation. After this redaction is applied and the affected content has been removed, the overlay appearance should be drawn such that its origin lines up with the lower-left corner of the annotation rectangle. This form XObject is not necessarily related to other annotation appearances, and may or may not be present in the Appearance dictionary. This entry takes precedence over the Interior Color(IC), OverlayText, OverlayTextAppearance(DA), and QuadPoint(Q) entries.
PDFNetException
public void setAppFormXO(Obj formxo) throws PDFNetException
Note: This overlay appearance object is a form XObject specifying the overlay appearance for this redaction annotation. After this redaction is applied and the affected content has been removed, the overlay appearance should be drawn such that its origin lines up with the lower-left corner of the annotation rectangle. This form XObject is not necessarily related to other annotation appearances, and may or may not be present in the Appearance dictionary. This entry takes precedence over the Interior Color(IC), OverlayText, OverlayTextAppearance(DA), and QuadPoint(Q) entries.
formxo
- An SDF object that represents the overlay appearance of the Redaction annotation.PDFNetException
public java.lang.String getOverlayText() throws PDFNetException
Note: The OverlayText string is a text string specifying the overlay text that should be drawn over the redacted region after the affected content has been removed. This entry is ignored if the Overlay appearance(RO) entry is present.
PDFNetException
public void setOverlayText(java.lang.String title) throws PDFNetException
Note: The OverlayText string is a text string specifying the overlay text that should be drawn over the redacted region after the affected content has been removed. This entry is ignored if the Overlay appearance(RO) entry is present.
title
- A string containing the overlay text of the annotation.PDFNetException
public boolean getUseRepeat() throws PDFNetException
Note: If UseRepeat value is true, then the text specified by OverlayText should be repeated to fill the redacted region after the affected content has been removed. This entry is ignored if the RO entry is present. Default value: false.
PDFNetException
public void setUseRepeat(boolean repeat) throws PDFNetException
Note: If UseRepeat value is true, then the text specified by OverlayText should be repeated to fill the redacted region after the affected content has been removed. This entry is ignored if the RO entry is present. Default value: false.
repeat
- the new use repeatPDFNetException
public java.lang.String getOverlayTextAppearance() throws PDFNetException
Note: The overlay text appearance is the appearance string to be used in formatting the overlay text when it is drawn after the affected content has been removed. This entry is ignored if the Overlay appearance strint(RO) entry is present.
PDFNetException
public void setOverlayTextAppearance(java.lang.String app) throws PDFNetException
Note: The overlay text appearance is the appearance string to be used in formatting the overlay text when it is drawn after the affected content has been removed. This entry is ignored if the Overlay appearance strint(RO) entry is present.
app
- A string containing the overlay text appearance of the annotation.PDFNetException
public int getQuadForm() throws PDFNetException
Note: quadding format specifies the form of quadding (justification) to be used in laying out the overlay
PDFNetException
public void setQuadForm(int form) throws PDFNetException
Note: Quadding format specifies the form of quadding (justification) to be used in laying out the overlay
form
- An entry of the "QuadForm" enum, indicating the
overlay text quadding(justification) format of the Redaction annotation .PDFNetException