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.
Extends
- MarkupAnnot
Members
-
<static> QuadForm
-
Properties:
Name Type Description e_LeftJustified
number e_Centered
number e_RightJustified
number e_None
number
Methods
-
<static> create(doc, pos)
-
Creates a new Redaction annotation in the specified document.
Parameters:
Name Type Description doc
PDFNet.PDFDoc | PDFNet.SDFDoc | PDFNet.FDFDoc 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
- Promise.<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: "PDFNet.RedactionAnnot"- Type
- Promise.<PDFNet.RedactionAnnot>
-
<static> createFromObj( [d])
-
creates a Redaction annotation and initializes it using given Cos/SDF object.
Parameters:
Name Type Argument Description d
PDFNet.Obj <optional>
The Cos/SDF object to initialze the annotation with. Returns:
A promise that resolves to an object of type: "PDFNet.RedactionAnnot"- Type
- Promise.<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
- Promise.<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
- Promise.<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
- Promise.<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
- Promise.<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
- Promise.<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
- Promise.<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
- Promise.<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. Returns:
- Type
- Promise.<void>
-
setOverlayText(title)
-
sets Overlay text of the Redaction annotation.
Parameters:
Name Type Description title
string A string containing the overlay text of the annotation. Returns:
- Type
- Promise.<void>
-
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. Returns:
- Type
- Promise.<void>
-
setQuadForm( [form])
-
sets Overlay text quadding (justification) format of the Redaction annotation.
Parameters:
Name Type Argument Description form
number <optional>
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
Returns:
- Type
- Promise.<void>
-
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. Returns:
- Type
- Promise.<void>
-
setUseRepeat( [userepeat])
-
sets the option of whether to use repeat for the Redaction annotation.
Parameters:
Name Type Argument Description userepeat
boolean <optional>
A bool indicating whether to repeat for the Redaction annotation. - Default Value:
-
- userepeat = false.
Returns:
- Type
- Promise.<void>