Foxit PDF SDK
FoxitPDFSDKPython2.Redaction Class Reference
Inheritance diagram for FoxitPDFSDKPython2.Redaction:
FoxitPDFSDKPython2.Base

Public Member Functions

def Redaction (document)
 Constructor, from a PDF document object. More...
 
def Apply ()
 Apply redaction in marked areas: remove the text or graphics under marked areas permanently. More...
 
def IsEmpty ()
 Check whether current object is empty or not. More...
 
def MarkRedactAnnot (page, 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
FoxitPDFSDKPython2.Redact

Constructor & Destructor Documentation

◆ Redaction()

def FoxitPDFSDKPython2.Redaction.Redaction (   document)

Constructor, from a PDF document object.

Constructor, with another redaction object.

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

Member Function Documentation

◆ Apply()

def FoxitPDFSDKPython2.Redaction.Apply ( )

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 FoxitPDFSDKPython2.Redact.SetApplyFillColor .

Returns
true means success, while false means failure.

◆ IsEmpty()

def FoxitPDFSDKPython2.Redaction.IsEmpty ( )

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()

def FoxitPDFSDKPython2.Redaction.MarkRedactAnnot (   page,
  rects 
)

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:

Once function FoxitPDFSDKPython2.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
[in]pageA PDF page whose content will be marked.
[in]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 redact annotation object (along with a pop-up annotation by default), with default appearance:
apply fill color = black, border color = red, opacity = 1.0.