public class PdfWidgetAnnotation extends PdfAnnotation
Modifier and Type | Field and Description |
---|---|
static int |
HIDDEN |
static int |
HIDDEN_BUT_PRINTABLE |
static int |
VISIBLE |
static int |
VISIBLE_BUT_DOES_NOT_PRINT |
Accepted, Canceled, Completed, HIGHLIGHT_INVERT, HIGHLIGHT_NONE, HIGHLIGHT_OUTLINE, HIGHLIGHT_PUSH, HIGHLIGHT_TOGGLE, INVISIBLE, LOCKED, LOCKED_CONTENTS, Marked, MarkedModel, NO_ROTATE, NO_VIEW, NO_ZOOM, None, page, PRINT, READ_ONLY, Rejected, ReviewModel, STYLE_BEVELED, STYLE_DASHED, STYLE_INSET, STYLE_SOLID, STYLE_UNDERLINE, TOGGLE_NO_VIEW, Unmarked
Modifier | Constructor and Description |
---|---|
protected |
PdfWidgetAnnotation(PdfDictionary pdfObject)
|
|
PdfWidgetAnnotation(Rectangle rect) |
Modifier and Type | Method and Description |
---|---|
PdfDictionary |
getAction()
An PdfAction to perform, such as launching an application, playing a sound, changing an annotation’s appearance state etc, when the annotation is activated.
|
PdfDictionary |
getAdditionalAction()
An additional actions dictionary that extends the set of events that can trigger the execution of an action.
|
PdfDictionary |
getAppearanceCharacteristics()
An appearance characteristics dictionary containing additional information for constructing the annotation’s appearance stream.
|
PdfDictionary |
getBorderStyle()
The dictionaries for some annotation types (such as free text and polygon annotations) can include the BS entry.
|
PdfName |
getHighlightMode()
Getter for the annotation's highlighting mode.
|
PdfName |
getSubtype()
Gets a PdfName which value is a subtype of this annotation.
|
void |
releaseFormFieldFromWidgetAnnotation()
This method removes all widget annotation entries from the form field the given annotation merged with.
|
PdfWidgetAnnotation |
setAction(PdfAction action)
Sets a PdfAction to this annotation which will be performed when the annotation is activated.
|
PdfWidgetAnnotation |
setAdditionalAction(PdfName key, PdfAction action)
Sets an additional PdfAction to this annotation which will be performed in response to the specific trigger event defined by key .
|
PdfWidgetAnnotation |
setAppearanceCharacteristics(PdfDictionary characteristics)
Sets an appearance characteristics dictionary containing additional information for constructing the annotation’s appearance stream.
|
PdfWidgetAnnotation |
setBorderStyle(PdfDictionary borderStyle)
Sets border style dictionary that has more settings than the array specified for the Border entry ( PdfAnnotation.getBorder() ).
|
PdfWidgetAnnotation |
setBorderStyle(PdfName style)
Setter for the annotation's preset border style.
|
PdfWidgetAnnotation |
setDashPattern(PdfArray dashPattern)
Setter for the annotation's preset dashed border style.
|
PdfWidgetAnnotation |
setHighlightMode(PdfName mode)
Setter for the annotation's highlighting mode.
|
PdfWidgetAnnotation |
setParent(PdfObject parent) |
PdfWidgetAnnotation |
setVisibility(int visibility)
Set the visibility flags of the Widget annotation Options are: HIDDEN, HIDDEN_BUT_PRINTABLE, VISIBLE, VISIBLE_BUT_DOES_NOT_PRINT
|
addAssociatedFile, flush, getAppearanceDictionary, getAppearanceObject, getAppearanceState, getAssociatedFiles, getBlendMode, getBorder, getColorObject, getContents, getDate, getDownAppearanceObject, getFlags, getLang, getName, getNonStrokingOpacity, getNormalAppearanceObject, getPage, getPageObject, getRectangle, getRolloverAppearanceObject, getStrokingOpacity, getStructParentIndex, getTitle, hasFlag, isWrappedObjectMustBeIndirect, makeAnnotation, put, remove, resetFlag, setAppearance, setAppearance, setAppearanceState, setBlendMode, setBorder, setBorder, setColor, setColor, setColor, setContents, setContents, setDate, setDownAppearance, setDownAppearance, setFlag, setFlags, setLang, setLayer, setName, setNonStrokingOpacity, setNormalAppearance, setNormalAppearance, setPage, setRectangle, setRolloverAppearance, setRolloverAppearance, setStrokingOpacity, setStructParentIndex, setTitle
ensureObjectIsAddedToDocument, ensureUnderlyingObjectHasIndirectReference, getPdfObject, isFlushed, makeIndirect, makeIndirect, markObjectAsIndirect, setForbidRelease, setModified, setPdfObject, unsetForbidRelease
public static final int HIDDEN
public static final int VISIBLE_BUT_DOES_NOT_PRINT
public static final int HIDDEN_BUT_PRINTABLE
public static final int VISIBLE
public PdfWidgetAnnotation(Rectangle rect)
protected PdfWidgetAnnotation(PdfDictionary pdfObject)
public PdfName getSubtype()
PdfAnnotation
PdfName
which value is a subtype of this annotation. See ISO-320001 12.5.6, "Annotation Types" for the reference to the possible types.
getSubtype
in class PdfAnnotation
public PdfWidgetAnnotation setParent(PdfObject parent)
public PdfWidgetAnnotation setHighlightMode(PdfName mode)
PdfAnnotation.HIGHLIGHT_NONE
- No highlighting. PdfAnnotation.HIGHLIGHT_INVERT
- Invert the contents of the annotation rectangle. PdfAnnotation.HIGHLIGHT_OUTLINE
- Invert the annotation's border. PdfAnnotation.HIGHLIGHT_PUSH
- Display the annotation?s down appearance, if any. PdfAnnotation.HIGHLIGHT_TOGGLE
- Same as P. mode
- The new value for the annotation's highlighting mode.
public PdfName getHighlightMode()
public void releaseFormFieldFromWidgetAnnotation()
public PdfWidgetAnnotation setVisibility(int visibility)
visibility
- visibility option
public PdfDictionary getAction()
PdfAction
to perform, such as launching an application, playing a sound, changing an annotation’s appearance state etc, when the annotation is activated.
PdfDictionary
which defines the characteristics and behaviour of an action.
public PdfWidgetAnnotation setAction(PdfAction action)
PdfAction
to this annotation which will be performed when the annotation is activated.
action
- PdfAction
to set to this annotation.
PdfWidgetAnnotation
instance.
public PdfDictionary getAdditionalAction()
PdfDictionary
.
getAction()
public PdfWidgetAnnotation setAdditionalAction(PdfName key, PdfAction action)
PdfAction
to this annotation which will be performed in response to the specific trigger event defined by key
. See ISO-320001 12.6.3, "Trigger Events".
key
- a PdfName
that denotes a type of the additional action to set.
action
- PdfAction
to set as additional to this annotation.
PdfWidgetAnnotation
instance.
public PdfDictionary getAppearanceCharacteristics()
public PdfWidgetAnnotation setAppearanceCharacteristics(PdfDictionary characteristics)
characteristics
- the PdfDictionary
with additional information for appearance stream.
PdfWidgetAnnotation
instance.
public PdfDictionary getBorderStyle()
PdfAnnotation.getBorder()
). If an annotation dictionary includes the BS entry, then the Border entry is ignored. If annotation includes AP (see PdfAnnotation.getAppearanceDictionary()
) it takes precedence over the BS entry. For more info on BS entry see ISO-320001, Table 166.
PdfDictionary
which is a border style dictionary or null if it is not specified.
public PdfWidgetAnnotation setBorderStyle(PdfDictionary borderStyle)
PdfAnnotation.getBorder()
). See ISO-320001, Table 166 and getBorderStyle()
for more info.
borderStyle
- a border style dictionary specifying the line width and dash pattern that shall be used in drawing the annotation’s border.
PdfWidgetAnnotation
instance.
public PdfWidgetAnnotation setBorderStyle(PdfName style)
PdfAnnotation.STYLE_SOLID
- A solid rectangle surrounding the annotation. PdfAnnotation.STYLE_DASHED
- A dashed rectangle surrounding the annotation. PdfAnnotation.STYLE_BEVELED
- A simulated embossed rectangle that appears to be raised above the surface of the page. PdfAnnotation.STYLE_INSET
- A simulated engraved rectangle that appears to be recessed below the surface of the page. PdfAnnotation.STYLE_UNDERLINE
- A single line along the bottom of the annotation rectangle. style
- The new value for the annotation's border style.
PdfWidgetAnnotation
instance.
getBorderStyle()
public PdfWidgetAnnotation setDashPattern(PdfArray dashPattern)
PdfAnnotation.STYLE_DASHED
style was used for the annotation border style (see setBorderStyle(PdfName)
. See ISO-320001 8.4.3.6, "Line Dash Pattern" for the format in which dash pattern shall be specified.
dashPattern
- a dash array defining a pattern of dashes and gaps that shall be used in drawing a dashed border.
PdfWidgetAnnotation
instance.
Copyright © 1998–2020 iText Group NV. All rights reserved.