public class TextMarkup extends Markup
Annot.BorderStyle
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 |
---|
TextMarkup()
Creates an empty TextMarkup annotation.
|
TextMarkup(Annot annot)
Creates a TextMarkup annotation and initialize it using given annotation object.
|
TextMarkup(Obj d)
Creates a TextMarkup annotation and initialize it using given Cos/SDF object.
|
Modifier and Type | Method and Description |
---|---|
QuadPoint |
getQuadPoint(int idx)
Get the QuadPoint located at a certain index of the QuadPoint array of the TextMarkup
annotation.
|
int |
getQuadPointCount()
Get the number of QuadPoints in the QuadPoints array of the TextMarkup annotation.
|
void |
setQuadPoint(int idx,
QuadPoint qp)
Set the QuadPoint to be located at a certain index of the QuadPoint array of the TextMarkup
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 TextMarkup(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 TextMarkup()
public TextMarkup(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 int getQuadPointCount() throws PDFNetException
Note: An array of n QuadPoints specifying the coordinates of nquadrilaterals in default user space. Each quadrilateral shall encompasses a word or group of contiguous words in the text underlying the annotation. The coordinates for each quadrilateral shall be given in the order p1, p2, p3, p4 specifying the quadrilateral's four vertices in counterclockwise order. The text shall be oriented with respect to the edge connecting points (p1) and (p2). The annotation dictionary's Appearance(AP) entry, if present, shall take precedence over QuadPoints.
PDFNetException
public QuadPoint getQuadPoint(int idx) throws PDFNetException
Note: An array of n QuadPoints specifying the coordinates of nquadrilaterals in default user space. Each quadrilateral shall encompasses a word or group of contiguous words in the text underlying the annotation. The coordinates for each quadrilateral shall be given in the order p1, p2, p3, p4 specifying the quadrilateral's four vertices in counterclockwise order. The text shall be oriented with respect to the edge connecting points (p1) and (p2). The annotation dictionary's Appearance(AP) entry, if present, shall take precedence over QuadPoints.
idx
- The index where the QuadPoint is to be located (the index is counted from 0, and continue on assendingly).PDFNetException
public void setQuadPoint(int idx, QuadPoint qp) throws PDFNetException
Note: To make this QuadPoint compatible with Adobe Acrobat|Reader, you can use either clockwise or counterclockwise order, but the points p3 and p4 must be swapped. This is because those readers do not follow the PDF specification for TextMarkup QuadPoints. An array of n QuadPoints specifying the coordinates of nquadrilaterals in default user space. Each quadrilateral shall encompasses a word or group of contiguous words in the text underlying the annotation. The coordinates for each quadrilateral shall be given in the order p1, p2, p3, p4 specifying the quadrilateral's four vertices in counterclockwise order. The text shall be oriented with respect to the edge connecting points (p1) and (p2). The annotation dictionary's Appearance(AP) entry, if present, shall take precedence over QuadPoints.
idx
- The index where the QuadPoint is to be located (the index is counted from 0, and continue on assendingly).qp
- The QuadPoint to be located at a certain index of the QuadPoint array of the TextMarkup annotation.PDFNetException