foxit.addon.Redaction Class Reference
Inheritance diagram for foxit.addon.Redaction:
foxit.common.Base

Public Member Functions

 Redaction (PDFDoc document)
 Constructor, from a PDF document object. More...
 
 Redaction (Redaction other)
 Constructor, with another Redaction object. More...
 
bool Apply ()
 Apply redaction in marked areas: remove the text or graphics under marked areas permanently. More...
 
bool IsEmpty ()
 Check whether current object is empty or not. More...
 
Redact MarkRedactAnnot (PDFPage page, RectFArray rects)
 Mark page contents (text object, image object, and path object) which are to be redacted. More...
 

Detailed Description

Redacting a PDF file allows user to hide sensitive information while keeping the document's formatting. This class can be used to mark page contents with redact annotations and apply redaction to permanently remove (redact) visible text and images from PDF documents to protect confidential information such as social security numbers.

See also
pdf::annots::Redact

Constructor & Destructor Documentation

◆ Redaction() [1/2]

foxit.addon.Redaction.Redaction ( PDFDoc  document)
inline

Constructor, from a PDF document object.

Parameters
documentA valid PDF document object.
Note
If module "Redaction" is not defined in the license information which is used in function common::Library::Initialize, that means user has no right in using Redaction related functions and this constructor will throw exception e_ErrInvalidLicense.

◆ Redaction() [2/2]

foxit.addon.Redaction.Redaction ( Redaction  other)
inline

Constructor, with another Redaction object.

Parameters
otherAnother Redaction object.

Member Function Documentation

◆ Apply()

bool foxit.addon.Redaction.Apply ( )
inline

Apply redaction in marked areas: remove the text or graphics under marked areas permanently.

Once this functions is called, all the marked page content(text object, image object, and path object) in the document will be removed permanently. All the redact annotations which specify marked areas will be removed (with their pop-up annotations) and these marked areas will be filled by the color specified by function pdf::annots::Redact::SetApplyFillColor.

Returns
true means success, while false means failure.

◆ IsEmpty()

bool foxit.addon.Redaction.IsEmpty ( )
inline

Check whether current object is empty or not.

When the current object is empty, that means current object is useless.

Returns
true means current object is empty, while false means not.

◆ MarkRedactAnnot()

Redact foxit.addon.Redaction.MarkRedactAnnot ( PDFPage  page,
RectFArray  rects 
)
inline

Mark page contents (text object, image object, and path object) which are to be redacted.

This function is to add special marks (called redact annotation) to the specified rectangles areas, in order to redact page contents in these areas. Usually, the marked area has two appearance:


Normal appearance, which is used when the marked area is not interacting with the user. The border color (also known as stroke color) can be set by function pdf::annots::Annot::SetBorderColor. The fill color can be set by function pdf::annots::Redact::SetFillColor. The opcacity can be set by function pdf::annots::Markup::SetOpacity.
Rollover appearance, which is used when the user moves the cursor into the marked area without pressing the mouse button. The border color and fill color are the same and can be set by function pdf::annots::Redact::SetApplyFillColor.
Once function Redaction::Apply is called, all the page contents under these marked area will be removed permanently and these marked areas will keep their rollover appearance all the time.

Parameters
pageA PDF page whose content will be marked.
rectsSpecify areas in the page to be marked. It should not be an empty array. All the input rectangles will be treated as one redact annotation.
Returns
A annots::Redact object (along with a pop-up annotation by default), with default appearance:
apply fill color = black, border color = red, opacity = 1.0.

Foxit Software Corporation Logo
@2018 Foxit Software Incorporated. All rights reserved.