Show / Hide Table of Contents

# Class Redaction

A redaction annotation (PDF 1.7) identifies content that is intended to be removed from the document. The intent of redaction annotations is to enable the following process:

Redaction annotations provide a mechanism for the first step in the redaction process (content identification). This allows content to be marked for redaction in a non-destructive way, thus enabling a review process for evaluating potential redactions prior to removing the specified content.

Redaction annotations shall provide enough information to be used in the second phase of the redaction process (content removal). This phase is application-specific and requires the conforming reader to remove all content identified by the redaction annotation, as well as the annotation itself.

Conforming readers that support redaction annotations shall provide a mechanism for applying content removal, and they shall remove all traces of the specified content. If a portion of an image is contained in a redaction region, that portion of the image data shall be destroyed; clipping or image masks shall not be used to hide that data. Such conforming readers shall also be diligent in their consideration of all content that can exist in a PDF document, including XML Forms Architecture (XFA) content and Extensible Metadata Platform (XMP) content.

##### Inheritance

object
Annot
Markup
Redaction

##### Implements

IDisposable

##### Inherited Members

Markup.GetTitle()
Markup.SetTitle(string)
Markup.GetPopup()
Markup.SetPopup(Popup)
Markup.GetOpacity()
Markup.SetOpacity(double)
Markup.GetSubject()
Markup.SetSubject(string)
Markup.GetCreationDates()
Markup.SetCreationDates(Date)
Markup.GetBorderEffect()
Markup.SetBorderEffect(Markup.BorderEffect)
Markup.GetBorderEffectIntensity()
Markup.SetBorderEffectIntensity(double)
Markup.GetInteriorColor()
Markup.GetInteriorColorCompNum()
Markup.SetInteriorColor(ColorPt, int)
Markup.GetContentRect()
Markup.SetContentRect(Rect)
Markup.GetPadding()
Markup.SetPadding(Rect)
Markup.RotateAppearance(double)
Annot.Dispose()
Annot.Dispose(bool)
Annot.GetHandleInternal()
Annot.GetRefHandleInternal()
Annot.CreateInternal(IntPtr, object)
Annot.Create(SDFDoc, Annot.Type, Rect)
Annot.op_Assign(Annot)
Annot.Equals(object)
Annot.IsValid()
Annot.GetSDFObj()
Annot.GetType()
Annot.IsMarkup()
Annot.GetRect()
Annot.GetVisibleContentBox()
Annot.SetRect(Rect)
Annot.GetContents()
Annot.SetContents(string)
Annot.GetPage()
Annot.SetPage(Page)
Annot.GetUniqueID()
Annot.SetUniqueID(string)
Annot.GetDate()
Annot.SetDate(Date)
Annot.GetFlag(Annot.Flag)
Annot.SetFlag(Annot.Flag, bool)
Annot.GetBorderStyle()
Annot.SetBorderStyle(Annot.BorderStyle)
Annot.GetAppearance()
Annot.GetAppearance(Annot.AnnotationState)
Annot.GetAppearance(Annot.AnnotationState, string)
Annot.SetAppearance(Obj)
Annot.SetAppearance(Obj, Annot.AnnotationState)
Annot.SetAppearance(Obj, Annot.AnnotationState, string)
Annot.RemoveAppearance()
Annot.RemoveAppearance(Annot.AnnotationState)
Annot.RemoveAppearance(Annot.AnnotationState, string)
Annot.Flatten(Page)
Annot.GetActiveAppearanceState()
Annot.SetActiveAppearanceState(string)
Annot.GetColorAsRGB()
Annot.GetColorAsCMYK()
Annot.GetColorAsGray()
Annot.GetColorCompNum()
Annot.SetColor(ColorPt, int)
Annot.SetColor(ColorPt)
Annot.GetStructParent()
Annot.SetStructParent(int)
Annot.GetOptionalContent()
Annot.SetOptionalContent(Obj)
Annot.Resize(Rect)
Annot.GetRotation()
Annot.SetRotation(int)
Annot.RefreshAppearance()
Annot.GetCustomData(string)
Annot.SetCustomData(string, string)
Annot.DeleteCustomData(string)
object.Equals(object, object)
object.GetHashCode()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()

###### Namespace: pdftron.PDF.Annots

###### Assembly: PDFTronDotNet.dll

##### Syntax

    public class Redaction : Markup, IDisposable

### Constructors

#### Redaction(Annot)

Creates an Redaction annotation and initialize it using given annotation object.

##### Declaration

    public Redaction(Annot ann)

##### Parameters

Type | Name | Description
--- | --- | ---
Annot | ann | the annot

##### Remarks

The constructor does not copy any data, but is instead the logical equivalent of a type cast.

##### Exceptions

Type | Condition
--- | ---
PDFNetException | PDFNetException the PDFNet exception

#### Redaction(Obj)

Creates an Redaction annotation and initialize it using given Cos/SDF object.

##### Declaration

    public Redaction(Obj d)

##### Parameters

Type | Name | Description
--- | --- | ---
Obj | d | the d

##### Remarks

The constructor does not copy any data, but is instead the logical equivalent of a type cast.

### Methods

#### Create(SDFDoc, Rect)

Creates a new Redaction annotation, in the specified document.

##### Declaration

    public static Redaction Create(SDFDoc doc, Rect pos)

##### Parameters

Type | Name | Description
--- | --- | ---
SDFDoc | doc | A document to which the annotation is added.
Rect | pos | A rectangle specifying the annotation's bounds, specified in user space coordinates.

##### Returns

Type | Description
--- | ---
Redaction | A newly created blank Circle annotation.

##### Exceptions

Type | Condition
--- | ---
PDFNetException | PDFNetException the PDFNet exception

#### ~Redaction()

##### Declaration

    protected ~Redaction()

#### GetAppFormXO()

Gets Overlay appearance of the Redaction annotation.

##### Declaration

    public Obj GetAppFormXO()

##### Returns

Type | Description
--- | ---
Obj | An SDF object that represents the overlay overlay appearance of the Redaction annotation.

##### Remarks

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.

##### Exceptions

Type | Condition
--- | ---
PDFNetException | PDFNetException the PDFNet exception

#### GetOverlayText()

Gets Overlay text of the Redaction annotation.

##### Declaration

    public string GetOverlayText()

##### Returns

Type | Description
--- | ---
string | A string containing the overlay text of the annotation.

##### Remarks

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.

##### Exceptions

Type | Condition
--- | ---
PDFNetException | PDFNetException the PDFNet exception

#### GetOverlayTextAppearance()

Gets Overlay text appearance of the Redaction annotation.

##### Declaration

    public string GetOverlayTextAppearance()

##### Returns

Type | Description
--- | ---
string | A string containing the overlay text appearance of the annotation.

##### Remarks

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.

##### Exceptions

Type | Condition
--- | ---
PDFNetException | PDFNetException the PDFNet exception

#### GetQuadForm()

Gets Overlay text quadding(justification) format of the Redaction annotation.

##### Declaration

    public Redaction.QuadForm GetQuadForm()

##### Returns

Type | Description
--- | ---
Redaction.QuadForm | An entry of the "QuadForm" enum, indicating the overlay text quadding(justification) format of the Redaction annotation .

##### Remarks

quadding format specifies the form of quadding (justification) to be used in laying out the overlay

##### Exceptions

Type | Condition
--- | ---
PDFNetException | PDFNetException the PDFNet exception

#### GetQuadPoint(int)

Gets the QuadPoint located at a certain index of the QuadPoint array of the Redaction annotation.

##### Declaration

    public QuadPoint GetQuadPoint(int idx)

##### Parameters

Type | Name | Description
--- | --- | ---
int | idx | The index of where the QuadPoint of interest is located.

##### Returns

Type | Description
--- | ---
QuadPoint | The QuadPoint located at a certain index of the QuadPoint array of the Redaction annotation.

##### Remarks

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

##### Exceptions

Type | Condition
--- | ---
PDFNetException | PDFNetException the PDFNet exception

#### GetQuadPointCount()

Gets the number of QuadPoints in the QuadPoints array of the Redaction annotation.

##### Declaration

    public int GetQuadPointCount()

##### Returns

Type | Description
--- | ---
int | The number of QuadPoints.

##### Remarks

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

##### Exceptions

Type | Condition
--- | ---
PDFNetException | PDFNetException the PDFNet exception

#### GetUseRepeat()

Gets the option of whether to use repeat for the Redaction annotation.

##### Declaration

    public bool GetUseRepeat()

##### Returns

Type | Description
--- | ---
bool | A bool indicating whether to repeat for the Redaction annotation.

##### Remarks

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.

##### Exceptions

Type | Condition
--- | ---
PDFNetException | PDFNetException the PDFNet exception

#### SetAppFormXO(Obj)

Sets Overlay appearance of the Redaction annotation. (Optional)

##### Declaration

    public void SetAppFormXO(Obj formxo)

##### Parameters

Type | Name | Description
--- | --- | ---
Obj | formxo | An SDF object that represents the overlay appearance of the Redaction annotation.

##### Remarks

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.

##### Exceptions

Type | Condition
--- | ---
PDFNetException | PDFNetException the PDFNet exception

#### SetOverlayText(string)

Sets Overlay text of the Redaction annotation.

##### Declaration

    public void SetOverlayText(string title)

##### Parameters

Type | Name | Description
--- | --- | ---
string | title | A string containing the overlay text of the annotation.

##### Remarks

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.

##### Exceptions

Type | Condition
--- | ---
PDFNetException | PDFNetException the PDFNet exception

#### SetOverlayTextAppearance(string)

Sets Overlay text appearance of the Redaction annotation.

##### Declaration

    public void SetOverlayTextAppearance(string app)

##### Parameters

Type | Name | Description
--- | --- | ---
string | app | A string containing the overlay text appearance of the annotation.

##### Remarks

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.

##### Exceptions

Type | Condition
--- | ---
PDFNetException | PDFNetException the PDFNet exception

#### SetOverlayTextFont(string)

Sets the overlay font name of the Redaction annotation.

##### Declaration

    public void SetOverlayTextFont(string font_name)

##### Parameters

Type | Name | Description
--- | --- | ---
string | font_name | A string containing the font name to use for the overlay text.

##### Remarks

The OverlayTextFont is a text string specifying the overlay font name that should be used for the overlay text of the redacted region after the affected content has been removed. This entry is ignored if the Overlay appearance stream (RO) entry is present.

##### Exceptions

Type | Condition
--- | ---
PDFNetException | PDFNetException the PDFNet exception

#### SetOverlayTextFontSize(double)

Sets the overlay font size of the Redaction annotation.

##### Declaration

    public void SetOverlayTextFontSize(double font_size)

##### Parameters

Type | Name | Description
--- | --- | ---
double | font_size | The font size to use for the overlay text. The value must be greater than 0.

##### Remarks

The OverlayTextFontSize is a number specifying the overlay font size that should be used for the overlay text of the redacted region after the affected content has been removed. This entry is ignored if the Overlay appearance stream (RO) entry is present.

##### Exceptions

Type | Condition
--- | ---
PDFNetException | PDFNetException the PDFNet exception

#### SetQuadForm()

Sets Overlay text quadding(justification) format of the Redaction annotation to e_LeftJustified

##### Declaration

    public void SetQuadForm()

#### SetQuadForm(QuadForm)

Sets Overlay text quadding(justification) format of the Redaction annotation.

##### Declaration

    public void SetQuadForm(Redaction.QuadForm form)

##### Parameters

Type | Name | Description
--- | --- | ---
Redaction.QuadForm | form | An entry of the "QuadForm" enum, indicating the overlay text quadding(justification) format of the Redaction annotation .

##### Remarks

Quadding format specifies the form of quadding (justification) to be used in laying out the overlay

##### Exceptions

Type | Condition
--- | ---
PDFNetException | PDFNetException the PDFNet exception

#### SetQuadPoint(int, QuadPoint)

Set the QuadPoint to be located at a certain index of the QuadPoint array of the Redaction annotation. (Optional; PDF 1.6 )

##### Declaration

    public void SetQuadPoint(int idx, QuadPoint pt)

##### Parameters

Type | Name | Description
--- | --- | ---
int | idx | The index position where the QuadPoint of interest is to be inserted.
QuadPoint | pt | The QuadPoint to be inserted at that position.

##### Remarks

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.

##### Exceptions

Type | Condition
--- | ---
PDFNetException | PDFNetException the PDFNet exception

#### SetUseRepeat()

Sets the option of whether to use repeat for the Redaction annotation to false.

##### Declaration

    public void SetUseRepeat()

#### SetUseRepeat(bool)

Sets the option of whether to use repeat for the Redaction annotation.

##### Declaration

    public void SetUseRepeat(bool repeat)

##### Parameters

Type | Name | Description
--- | --- | ---
bool | repeat | the new use repeat

##### Remarks

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.

##### Exceptions

Type | Condition
--- | ---
PDFNetException | PDFNetException the PDFNet exception

### Implements

IDisposable