pdftron::PDF::Annots::Redaction Class Reference

A redaction annotation (PDF 1.7) identifies content that is intended to be removed from the document. More...

#include <Redaction.h>

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

Inheritance graph
[legend]
Collaboration diagram for pdftron::PDF::Annots::Redaction:

Collaboration graph
[legend]

List of all members.

Public Types

enum  QuadForm { e_LeftJustified, e_Centered, e_RightJustified, e_None }
 This enum represents the justification format of the Redaction annotation's overlay text. More...

Public Member Functions

 Redaction (SDF::Obj d=0)
 Creates a Redaction annotation and initializes it using given Cos/SDF object.
 Redaction (const Annot &ann)
 Creates an Redaction annotation and initializes it using given annotation object.
int GetQuadPointCount ()
 Returns the number of QuadPoints in the QuadPoints array of the Redaction annotation.
QuadPoint GetQuadPoint (int idx) const
 Returns the QuadPoint located at a certain index of the QuadPoint array of the Redaction annotation.
void SetQuadPoint (int idx, const QuadPoint &qp)
 Set the QuadPoint to be located at a certain index of the QuadPoint array of the Redaction annotation.
SDF::Obj GetAppFormXO () const
 Returns Overlay appearance of the Redaction annotation.
void SetAppFormXO (SDF::Obj formxo)
 Sets Overlay appearance of the Redaction annotation.
UString GetOverlayText () const
 Returns Overlay text of the Redaction annotation.
void SetOverlayText (const UString &title)
 Sets Overlay text of the Redaction annotation.
bool GetUseRepeat () const
 Returns the option of whether to use repeat for the Redaction annotation.
void SetUseRepeat (bool repeat=false)
 Sets the option of whether to use repeat for the Redaction annotation.
UString GetOverlayTextAppearance () const
 Returns Overlay text appearance of the Redaction annotation.
void SetOverlayTextAppearance (const UString &app)
 Sets Overlay text appearance of the Redaction annotation.
QuadForm GetQuadForm () const
 Returns Overlay text quadding(justification) format of the Redaction annotation.
void SetQuadForm (QuadForm form=e_LeftJustified)
 Sets Overlay text quadding (justification) format of the Redaction annotation.

Static Public Member Functions

static Redaction Create (SDF::SDFDoc &doc, const Rect &pos)
 Creates a new Redaction annotation in the specified document.


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.


Member Enumeration Documentation

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.


Constructor & Destructor Documentation

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

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

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.

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


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.

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.

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.

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.

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.

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.

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.

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.

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::SetUseRepeat ( bool  repeat = false  ) 

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

Parameters:
app 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.

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.

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.

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.

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.


© 2002-2010 PDFTron Systems Inc.