Package com.itextpdf.kernel.pdf.annot
Class PdfRedactAnnotation
java.lang.Object
com.itextpdf.kernel.pdf.PdfObjectWrapper<PdfDictionary>
com.itextpdf.kernel.pdf.annot.PdfAnnotation
com.itextpdf.kernel.pdf.annot.PdfMarkupAnnotation
com.itextpdf.kernel.pdf.annot.PdfRedactAnnotation
-
Field Summary
Fields inherited from class com.itextpdf.kernel.pdf.annot.PdfMarkupAnnotation
inReplyTo, popup
Fields inherited from class com.itextpdf.kernel.pdf.annot.PdfAnnotation
Accepted, Canceled, Completed, HIDDEN, 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
-
Constructor Summary
ModifierConstructorDescriptionPdfRedactAnnotation
(Rectangle rect) protected
PdfRedactAnnotation
(PdfDictionary pdfObject) Instantiates a newPdfRedactAnnotation
instance based onPdfDictionary
instance, that represents existing annotation object in the document. -
Method Summary
Modifier and TypeMethodDescriptionThe default appearance string that shall be used in formatting the text.The interior color which is used to fill the redacted region after the affected content has been removed.int
A code specifying the form of quadding (justification) that is used in displaying the annotation's text: 0 - Left-justified, 1 - Centered, 2 - Right-justified.An array of 8 × n numbers specifying the coordinates of n quadrilaterals in default user space.Gets aPdfName
which value is a subtype of this annotation.setDefaultAppearance
(PdfString appearanceString) The default appearance string that shall be used in formatting the text.setInteriorColor
(float[] interiorColor) An array of numbers in the range 0.0 to 1.0 specifying the interior color which is used to fill the redacted region after the affected content has been removed.setInteriorColor
(PdfArray interiorColor) An array of numbers in the range 0.0 to 1.0 specifying the interior color which is used to fill the redacted region after the affected content has been removed.setJustification
(int justification) A code specifying the form of quadding (justification) that is used in displaying the annotation's text: 0 - Left-justified, 1 - Centered, 2 - Right-justified.setOverlayText
(PdfString text) setQuadPoints
(PdfArray quadPoints) Sets n quadrilaterals in default user space by passing anPdfArray
of 8 × n numbers.setRedactRolloverAppearance
(PdfStream stream) setRepeat
(PdfBoolean repeat) Methods inherited from class com.itextpdf.kernel.pdf.annot.PdfMarkupAnnotation
getCreationDate, getExternalData, getInReplyTo, getInReplyToObject, getIntent, getOpacity, getPopup, getPopupObject, getReplyType, getRichText, getSubject, getText, setCreationDate, setExternalData, setInReplyTo, setIntent, setOpacity, setPopup, setReplyType, setRichText, setSubject, setText
Methods inherited from class com.itextpdf.kernel.pdf.annot.PdfAnnotation
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
Methods inherited from class com.itextpdf.kernel.pdf.PdfObjectWrapper
ensureObjectIsAddedToDocument, ensureUnderlyingObjectHasIndirectReference, getPdfObject, isFlushed, makeIndirect, makeIndirect, markObjectAsIndirect, setForbidRelease, setModified, setPdfObject, unsetForbidRelease
-
Constructor Details
-
PdfRedactAnnotation
-
PdfRedactAnnotation
Instantiates a newPdfRedactAnnotation
instance based onPdfDictionary
instance, that represents existing annotation object in the document.- Parameters:
-
pdfObject
- thePdfDictionary
representing annotation object - See Also:
-
-
Method Details
-
getSubtype
Description copied from class:PdfAnnotation
Gets aPdfName
which value is a subtype of this annotation. See ISO-320001 12.5.6, "Annotation Types" for the reference to the possible types.- Specified by:
-
getSubtype
in classPdfAnnotation
- Returns:
- subtype of this annotation.
-
getDefaultAppearance
The default appearance string that shall be used in formatting the text. See ISO-32001 12.7.3.3, "Variable Text".- Returns:
-
a
PdfString
that specifies the default appearance, or null if default appereance is not specified.
-
setDefaultAppearance
The default appearance string that shall be used in formatting the text. See ISO-32001 12.7.3.3, "Variable Text".- Parameters:
-
appearanceString
- aPdfString
that specifies the default appearance. - Returns:
-
this
PdfMarkupAnnotation
instance.+
-
setDefaultAppearance
-
setOverlayText
-
getOverlayText
-
setRedactRolloverAppearance
-
getRedactRolloverAppearance
-
setRepeat
-
getRepeat
-
getQuadPoints
An array of 8 × n numbers specifying the coordinates of n quadrilaterals in default user space. Quadrilaterals are used to define the content region that is intended to be removed for a redaction annotation.- Returns:
-
an
PdfArray
of 8 × n numbers specifying the coordinates of n quadrilaterals.
-
setQuadPoints
Sets n quadrilaterals in default user space by passing anPdfArray
of 8 × n numbers. Quadrilaterals are used to define the content region that is intended to be removed for a redaction annotation.- Parameters:
-
quadPoints
- anPdfArray
of 8 × n numbers specifying the coordinates of n quadrilaterals. - Returns:
-
this
PdfRedactAnnotation
instance.
-
getInteriorColor
The interior color which is used to fill the redacted region after the affected content has been removed.- Returns:
-
Color
of eitherDeviceGray
,DeviceRgb
orDeviceCmyk
type which defines interior color of the annotation, or null if interior color is not specified.
-
setInteriorColor
An array of numbers in the range 0.0 to 1.0 specifying the interior color which is used to fill the redacted region after the affected content has been removed.- Parameters:
-
interiorColor
- aPdfArray
of numbers in the range 0.0 to 1.0. The number of array elements determines the colour space in which the colour is defined: 0 - No colour, transparent; 1 - DeviceGray, 3 - DeviceRGB, 4 - DeviceCMYK. For thePdfRedactAnnotation
number of elements shall be equal to 3 (which defines DeviceRGB colour space). - Returns:
-
this
PdfRedactAnnotation
instance.
-
setInteriorColor
An array of numbers in the range 0.0 to 1.0 specifying the interior color which is used to fill the redacted region after the affected content has been removed.- Parameters:
-
interiorColor
- an array of floats in the range 0.0 to 1.0. - Returns:
-
this
PdfRedactAnnotation
instance.
-
getJustification
public int getJustification()A code specifying the form of quadding (justification) that is used in displaying the annotation's text: 0 - Left-justified, 1 - Centered, 2 - Right-justified. Default value: 0 (left-justified).- Returns:
- a code specifying the form of quadding (justification), returns the default value if not explicitly specified.
-
setJustification
A code specifying the form of quadding (justification) that is used in displaying the annotation's text: 0 - Left-justified, 1 - Centered, 2 - Right-justified. Default value: 0 (left-justified).- Parameters:
-
justification
- a code specifying the form of quadding (justification). - Returns:
-
this
PdfRedactAnnotation
instance.
-