- Main Page
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Member Functions | Static Public Member Functions | List of all members
pdftron::PDF::Annots::Redaction Class Reference

`#include <Redaction.h>`

Inheritance diagram for pdftron::PDF::Annots::Redaction:

## Public Types
enum | QuadForm { e_LeftJustified, e_Centered, e_RightJustified, e_None }
Public Types inherited from pdftron::PDF::Annots::Markup
enum | BorderEffect { e_None, e_Cloudy }
Public Types inherited from pdftron::PDF::Annot
enum | Type { e_Text, e_Link, e_FreeText, e_Line, e_Square, e_Circle, e_Polygon, e_Polyline, e_Highlight, e_Underline, e_Squiggly, e_StrikeOut, e_Stamp, e_Caret, e_Ink, e_Popup, e_FileAttachment, e_Sound, e_Movie, e_Widget, e_Screen, e_PrinterMark, e_TrapNet, e_Watermark, e_3D, e_Redact, e_Projection, e_RichMedia, e_Unknown }
enum | Flag { e_invisible, e_hidden, e_print, e_no_zoom, e_no_rotate, e_no_view, e_read_only, e_locked, e_toggle_no_view, e_locked_contents }
enum | ActionTriggerEvent { e_action_trigger_activate = 0, e_action_trigger_annot_enter = 1, e_action_trigger_annot_exit = 2, e_action_trigger_annot_down = 3, e_action_trigger_annot_up = 4, e_action_trigger_annot_focus = 5, e_action_trigger_annot_blur = 6, e_action_trigger_annot_page_open = 7, e_action_trigger_annot_page_close = 8, e_action_trigger_annot_page_visible = 9, e_action_trigger_annot_page_invisible = 10 }
enum | AnnotationState { e_normal, e_rollover, e_down }
typedef pdftron::PDF::BorderStyle | BorderStyle

## Public Member Functions
| Redaction (SDF::Obj d=0)
| Redaction (const Annot &ann)
int | GetQuadPointCount ()
QuadPoint | GetQuadPoint (int idx) const
void | SetQuadPoint (int idx, const QuadPoint &qp)
SDF::Obj | GetAppFormXO () const
void | SetAppFormXO (SDF::Obj formxo)
UString | GetOverlayText () const
void | SetOverlayText (const UString &title)
bool | GetUseRepeat () const
void | SetUseRepeat (bool userepeat=false)
UString | GetOverlayTextAppearance () const
void | SetOverlayTextAppearance (const UString &app)
void | SetOverlayTextFont (const UString &font_name)
void | SetOverlayTextFontSize (double font_size)
QuadForm | GetQuadForm () const
void | SetQuadForm (QuadForm form=e_LeftJustified)
Public Member Functions inherited from pdftron::PDF::Annots::Markup
| Markup (SDF::Obj d=0)
| Markup (const Annot &ann)
UString | GetTitle ()
void | SetTitle (const UString &title)
void | SetTitle (const char *title)
Popup | GetPopup () const
void | SetPopup (const Popup &ppup)
double | GetOpacity () const
void | SetOpacity (double op)
UString | GetSubject () const
void | SetSubject (const UString &contents)
Date | GetCreationDates () const
void | SetCreationDates (const Date &dt)
BorderEffect | GetBorderEffect () const
void | SetBorderEffect (BorderEffect effect=e_None)
double | GetBorderEffectIntensity () const
void | SetBorderEffectIntensity (double intensity=0)
ColorPt | GetInteriorColor () const
int | GetInteriorColorCompNum () const
void | SetInteriorColor (const ColorPt &c, int CompNum)
Rect | GetContentRect () const
void | SetContentRect (const Rect &cr)
Rect | GetPadding () const
void | SetPadding (const Rect &rd)
void | SetPadding (double x)
void | RotateAppearance (double angle)
Public Member Functions inherited from pdftron::PDF::Annot
| Annot (SDF::Obj d=0)
| Annot (const Annot &d)
Annot & | operator= (const Annot &d)
bool | operator== (const Annot &d)
bool | IsValid () const
SDF::Obj | GetSDFObj () const
Type | GetType () const
Rect | GetRect () const
Rect | GetVisibleContentBox () const
bool | IsMarkup () const
void | SetRect (const Rect &pos)
Page | GetPage () const
void | SetPage (const Page &page)
SDF::Obj | GetUniqueID () const
void | SetUniqueID (const char *id, int id_buf_sz=0)
Date | GetDate () const
void | SetDate (const Date &date)
bool | GetFlag (Flag flag) const
void | SetFlag (Flag flag, bool value)
SDF::Obj | GetTriggerAction (Annot::ActionTriggerEvent trigger)
BorderStyle | GetBorderStyle () const
void | SetBorderStyle (const BorderStyle &bs, bool oldStyleOnly=false)
SDF::Obj | GetAppearance (AnnotationState annot_state=e_normal, const char *app_state=0)
void | SetAppearance (SDF::Obj app_stream, AnnotationState annot_state=e_normal, const char *app_state=0)
void | RemoveAppearance (AnnotationState annot_state=e_normal, const char *app_state=0)
void | Flatten (class Page page)
const char * | GetActiveAppearanceState () const
void | SetActiveAppearanceState (const char *astate)
ColorPt | GetColorAsRGB () const
ColorPt | GetColorAsCMYK () const
ColorPt | GetColorAsGray () const
int | GetColorCompNum () const
void | SetColor (const ColorPt &col, int numcomp=3)
int | GetStructParent () const
void | SetStructParent (const int parkeyval)
SDF::Obj | GetOptionalContent () const
void | SetOptionalContent (SDF::Obj content)
void | SetContents (const UString &contents)
UString | GetContents () const
int | GetRotation () const
void | SetRotation (int angle)
void | RefreshAppearance ()
void | RefreshAppearance (const RefreshOptions &options)
UString | GetCustomData (const UString &key) const
void | SetCustomData (const UString &key, const UString &value)
void | DeleteCustomData (const UString &key)
void | Resize (const Rect &newrect)
ptrdiff_t | GetHandleInternal ()

## Static Public Member Functions
static Redaction | Create (SDF::SDFDoc &doc, const Rect &pos)
static Redaction | CreateAnnot (SDF::SDFDoc &doc, const Rect &pos)
Static Public Member Functions inherited from pdftron::PDF::Annot
static Annot | Create (SDF::SDFDoc &doc, Type type, const Rect &pos)
static Annot * | CreateInternal (ptrdiff_t impl)

## Detailed Description

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: a)Content identification. A user applies redact annotations that specify the pieces or regions of content that should be removed. Up until the next step is performed, the user can see, move and redefine these annotations. b)Content removal. The user instructs the viewer application to apply the redact annotations, after which the content in the area specified by the redact annotations is removed. In the removed content's place, some marking appears to indicate the area has been redacted. Also, the redact annotations are removed from the PDF document. 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.

Definition at line 51 of file Redaction.h.

## Member Enumeration Documentation

enum pdftron::PDF::Annots::Redaction::QuadForm

This enum represents the justification format of the Redaction annotation's overlay text.

Enumerator
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.

Definition at line 238 of file Redaction.h.

## Constructor & Destructor Documentation

pdftron::PDF::Annots::Redaction::Redaction | ( | SDF::Obj | d = `0` | ) |

Creates a Redaction annotation and initializes it using given Cos/SDF object.

Parameters

  d | The Cos/SDF object to initialze the annotation with.

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

pdftron::PDF::Annots::Redaction::Redaction | ( | const Annot & | ann | ) |
| inline

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

Parameters

  ann | Annot object used to initialize the Redaction annotation.

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

Definition at line 68 of file Redaction.h.

## Member Function Documentation

static Redaction pdftron::PDF::Annots::Redaction::Create | ( | SDF::SDFDoc & | doc,
|  | const Rect & | pos
| ) |  |
| static

Creates a new Redaction annotation in the specified document.

Parameters

  doc | A document to which the annotation is added.
  pos | A rectangle specifying the annotation's bounds, in user space coordinates.

Returns
  A newly created blank Circle annotation.

static Redaction pdftron::PDF::Annots::Redaction::CreateAnnot | ( | SDF::SDFDoc & | doc,
|  | const Rect & | pos
| ) |  |
| static

SDF::Obj pdftron::PDF::Annots::Redaction::GetAppFormXO | ( |  | ) | const

Returns Overlay appearance of the Redaction annotation.

Returns
  An SDF object that represents the overlay appearance of the Redaction annotation.

Note
  This 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.

UString pdftron::PDF::Annots::Redaction::GetOverlayText | ( |  | ) | const

Returns Overlay text of the Redaction annotation.

Returns
  A string containing the overlay text of the annotation.

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.

UString pdftron::PDF::Annots::Redaction::GetOverlayTextAppearance | ( |  | ) | const

Returns Overlay text appearance of the Redaction annotation.

Returns
  A string containing the overlay text appearance of the annotation.

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 stream (RO) entry is present.

QuadForm pdftron::PDF::Annots::Redaction::GetQuadForm | ( |  | ) | const

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

Returns
  A value of the "QuadForm" enum type, indicating the overlay text quadding(justification) format of the Redaction annotation's overlay text.

QuadPoint pdftron::PDF::Annots::Redaction::GetQuadPoint | ( | int | idx | ) | const

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

Parameters

  idx | The index of the QuadPoint, starts at zero and must be less than return value of GetQuadPointCount().

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

Note
  An array of n QuadPoints that denote the content region that is intended to be removed. If quad points are not present, the Rect entry denotes the content region that is intended to be removed.

int pdftron::PDF::Annots::Redaction::GetQuadPointCount | ( |  | ) |

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

Returns
  The number of QuadPoints.

Note
  An array of n QuadPoints that denote the content region that is intended to be removed. If quad points are not present, the Rect entry denotes the content region that is intended to be removed.

bool pdftron::PDF::Annots::Redaction::GetUseRepeat | ( |  | ) | const

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

Returns
  A bool indicating whether to repeat for the Redaction annotation.

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 Overlay appearance stream (RO) entry is present. Default value: false.

void pdftron::PDF::Annots::Redaction::SetAppFormXO | ( | SDF::Obj | formxo | ) |

Sets Overlay appearance of the Redaction annotation. (Optional)

Parameters

  formxo | An SDF object that represents the overlay appearance of the Redaction annotation.

Note
  This 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.

void pdftron::PDF::Annots::Redaction::SetOverlayText | ( | const UString & | title | ) |

Sets Overlay text of the Redaction annotation.

Parameters

  title | A string containing the overlay text of the annotation.

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 stream (RO) entry is present.

void pdftron::PDF::Annots::Redaction::SetOverlayTextAppearance | ( | const UString & | app | ) |

Sets Overlay text appearance of the Redaction annotation.

Parameters

  app | A string containing the overlay text appearance of the annotation.

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 stream (RO) entry is present.

void pdftron::PDF::Annots::Redaction::SetOverlayTextFont | ( | const UString & | font_name | ) |

Sets the overlay font name of the Redaction annotation.

Parameters

  font_name | A string containing the font name to use for the overlay text.

Note
  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.

void pdftron::PDF::Annots::Redaction::SetOverlayTextFontSize | ( | double | font_size | ) |

Sets the overlay font size of the Redaction annotation.

Parameters

  font_size | The font size to use for the overlay text. The value must be greater than 0.

Note
  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.

void pdftron::PDF::Annots::Redaction::SetQuadForm | ( | QuadForm | form = `e_LeftJustified` | ) |

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

Parameters

  form | A value of the "QuadForm" enum type, indicating the overlay text quadding(justification) format of the Redaction annotation.

Note
  Quadding format specifies the form of justification to be used in displaying the overlay text. form=e_LeftJustified

void pdftron::PDF::Annots::Redaction::SetQuadPoint | ( | int | idx,
|  | const QuadPoint & | qp
| ) |  |

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

Parameters

  idx | The index position where the QuadPoint of interest is to be inserted, starting at 0.
  qp | The QuadPoint to be inserted at that position.

Note
  For orientation purposes, 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.

void pdftron::PDF::Annots::Redaction::SetUseRepeat | ( | bool | userepeat = `false` | ) |

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

Parameters

  userepeat | A bool indicating whether to repeat for the Redaction annotation.

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 Overlay appearance stream (RO) entry is present. userepeat = false.

The documentation for this class was generated from the following file:

- PDF/Annots/Redaction.h