Class: RedactionAnnot

PDFNet. RedactionAnnot


new RedactionAnnot()

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.

Methods


<static> create(doc, pos)

Creates a new Redaction annotation in the specified document.

Parameters:
Name Type Description
doc PDFNet.SDFDoc

A document to which the annotation is added.

pos PDFNet.rect

A rectangle specifying the annotation's bounds, in user space coordinates.

Returns:

A promise that resolves to a newly created blank Circle annotation.

Type
PDFNet.RedactionAnnot

<static> createFromAnnot(ann)

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

Parameters:
Name Type Description
ann PDFNet.Annot

Annot object used to initialize the Redaction annotation.

Returns:

A promise that resolves to an object of type: "RedactionAnnot"

Type
PDFNet.RedactionAnnot

<static> createFromObj(d)

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

Parameters:
Name Type Description
d PDFNet.Obj

The Cos/SDF object to initialze the annotation with.

Returns:

A promise that resolves to an object of type: "RedactionAnnot"

Type
PDFNet.RedactionAnnot

getAppFormXO()

Returns Overlay appearance of the Redaction annotation.

Returns:

A promise that resolves to an SDF object that represents the overlay appearance of the Redaction annotation.

Type
PDFNet.Obj

getOverlayText()

Returns Overlay text of the Redaction annotation.

Returns:

A promise that resolves to a string containing the overlay text of the annotation.

Type
string

getOverlayTextAppearance()

Returns Overlay text appearance of the Redaction annotation.

Returns:

A promise that resolves to a string containing the overlay text appearance of the annotation.

Type
string

getQuadForm()

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

Returns:

A promise that resolves to a value of the "QuadForm" enum type, indicating the overlay text quadding(justification) format of the Redaction annotation's overlay text.

Type
number
Example
Return value enum:
<pre>
PDFNet.RedactionAnnot.QuadForm = {
	e_LeftJustified : 0
	e_Centered : 1
	e_RightJustified : 2
	e_None : 3
}
</pre>

getQuadPoint(idx)

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

Parameters:
Name Type Description
idx number

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

Returns:

A promise that resolves to the QuadPoint located at a certain index of the QuadPoint array of the Redaction annotation.

Type
PDFNet.quadpoint

getQuadPointCount()

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

Returns:

A promise that resolves to the number of QuadPoints.

Type
number

getUseRepeat()

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

Returns:

A promise that resolves to a bool indicating whether to repeat for the Redaction annotation.

Type
boolean

setAppFormXO(formxo)

sets Overlay appearance of the Redaction annotation. (Optional)

Parameters:
Name Type Description
formxo PDFNet.Obj

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


setOverlayText(title)

sets Overlay text of the Redaction annotation.

Parameters:
Name Type Description
title string

A string containing the overlay text of the annotation.


setOverlayTextAppearance(app)

sets Overlay text appearance of the Redaction annotation.

Parameters:
Name Type Description
app string

A string containing the overlay text appearance of the annotation.


setQuadForm(form)

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

Parameters:
Name Type Description
form number/enum
PDFNet.RedactionAnnot.QuadForm = {
	e_LeftJustified : 0
	e_Centered : 1
	e_RightJustified : 2
	e_None : 3
}

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

Default Value:
  • form=e_LeftJustified

setQuadPoint(idx, qp)

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

Parameters:
Name Type Description
idx number

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

qp PDFNet.quadpoint

The QuadPoint to be inserted at that position.


setUseRepeat(userepeat)

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

Parameters:
Name Type Description
userepeat boolean

A bool indicating whether to repeat for the Redaction annotation.

Default Value:
  • userepeat = false.