FoxitPDFSDKforWeb  v9.2.1
Foxit PDF SDK for Web
Redact Class Reference

Redact annot object. More...

Inheritance diagram for Redact:
Markup Annot

Public Member Functions

 apply ()
 Apply redaction in marked areas. [Support in Server] More...
 
 getDefaultAppearance ()
 Get the default appearance data for redact. More...
 
 getFillColor ()
 Get redact annotation's fill color. More...
 
 getOverlayText ()
 Get the custom redact‘s overlay text. More...
 
 getOverlayTextAlignment ()
 Get alignment value of overlay text. More...
 
 getRepeat ()
 Get the Repeat status of current redact. More...
 
 removeOverlayText ()
 Remove the custom overlay text for redact. More...
 
 setAutoFontSize (isAutoFontSize)
 Set auto font size for current redact. More...
 
 setDefaultAppearance (appearance)
 Set the default appearance data to redact. More...
 
 setFillColor (fillColor)
 Set the fill color for redact. More...
 
 setOpacity (opacity, onlyForFill)
 Set the opacity value for redact. More...
 
 setOverlayText (overlayText)
 Set the custom overlay text for redact. More...
 
 setOverlayTextAlignment (alignment)
 Set alignment value of overlay text. More...
 
 setRedactApplyFillColor (applyFillColor)
 Set the filling color which is used for rollover appearance and will be used after redaction is applied. [Support in Server] More...
 
 setRepeat (isRepeat)
 Set the Repeat status of current redact. More...
 
- Public Member Functions inherited from Markup
 addMarkedState (stateName)
 Add marked state with specific name [Support in Server] More...
 
 addReply (content)
 Add a new reply to the end of reply list. [Support in Server] More...
 
 addReviewState (stateName)
 Add review state with specific name. [Support in Server] More...
 
 addRichText (datas)
 Add new text data with rich styles to the end. Note: Now, only support Freetext annotation. if current annotation is a freetext and its intent is "FreeTextTypewriter", text aligment of input style will be set to all rich text strings of current freetext annotation. More...
 
 exportToJSON ()
 Export annotation to a json object. [Support in Server] Override Annot::exportToJSON. More...
 
 getCreateDateTime ()
 Get creation date time. [Support in Server] More...
 
 getGroupElements ()
 Get the group annotations which own current annotation. [Support in Server] More...
 
 getGroupHeader ()
 Get the header annotation (as primary annotation) of the group that current markup annotation belongs to. [Support in Server] More...
 
 getIntent ()
 Get intent name.
Following annotation types have predefined intent name: More...
 
 getMarkedState (index)
 Get a state annotation by index. state model is marked [Support in Server] More...
 
 getMarkedStateCount ()
 Get the count of state annotations. [Support in Server] More...
 
 getMarkedStates ()
 Get all state annotation. state model is marked [Support in Server] More...
 
 getOpacity ()
 Get opacity value.
This property has effect on markup annotation's appearance. [Support in Server] More...
 
 getPopup ()
 Get annotation's popup. [Support in Server] More...
 
 getReplies ()
 Get all replies [Support in Server] More...
 
 getReply (index)
 Get a reply annot by index. [Support in Server] More...
 
 getReplyCount ()
 Count all replies. [Support in Server] More...
 
 getReviewState (index)
 Get a state annotation by index. state model is review [Support in Server] More...
 
 getReviewStateCount ()
 Get the count of state annotations. [Support in Server]
When state model is review, the markup annotation can have several state annotations in a chain: first state annotation refers to the markup annotation, second state annotation refers to the first state annotation, etc. Just like this: markup annotation <– reviewed state1 <– reviewed state2 ... More...
 
 getReviewStates ()
 Get all state annotation. state model is review [Support in Server] More...
 
 getRichText ()
 Get the rich text data, including rich text strings and styles. Note: Now, only support Freetext annotation. if current annotation is a freetext and its intent is "FreeTextTypewriter", text aligment of input style will be set to all rich text strings of current freetext annotation. More...
 
 getSubject ()
 Get subject string. [Support in Server] More...
 
 getTitle ()
 Get title string. [Support in Server] More...
 
 insertRichText (datas)
 Insert rich text string to the place which is specified by indexs. More...
 
 isGrouped ()
 Check whether current markup annotation is in a group or not. [Support in Server] More...
 
 isGroupHeader ()
 Check whether current markup annotation is a group header annotation. [Support in Server] More...
 
 removeAllStateAnnots ()
 Remove all sate from this markup annotation. [Support in Server] More...
 
 removeRichText (indexes)
 Remove a rich text string specified by index. More...
 
 setContent (content)
 Set markup annotation's contents. [Support in Server] More...
 
 setCreateDateTime (date)
 Set creation date time. [Support in Server] More...
 
 setIntent (intent)
 Set annotaions's intent. More...
 
 setOpacity (opacity)
 Set opacity value. [Support in Server] More...
 
 setRichText (datas)
 Set the rich text data with rich styles to the place which is specified by indexes. Note: Now, only support Freetext annotation. if current annotation is a freetext and its intent is "FreeTextTypewriter", text alignment of input style will be set to all rich text strings of current freetext annotation. More...
 
 setSubject (subject)
 Set subject string. [Support in Server] More...
 
 setTitle (title)
 Set title string. [Support in Server] More...
 
- Public Member Functions inherited from Annot
 exportToJSON ()
 Export the current annotation to a Json object. [Support in Server] More...
 
 getBorderColor ()
 Get annotation's border color. [Support in Server] More...
 
 getBorderInfo ()
 Get annotation's border information. [Support in Server] More...
 
 getContent ()
 Get annotation's contents. [Support in Server] More...
 
 getDictionaryEntry (key)
 Get the dictionary property of Annot by key. More...
 
 getFlags ()
 Get annotation's flag. [Support in Server] More...
 
 getModifiedDateTime ()
 Get annotation's last modified date time. [Support in Server] More...
 
 getObjectNumber ()
 Get annotation's object number. More...
 
 getPage ()
 Get annotation's page. [Support in Server] More...
 
 getRect ()
 Get annotation's rect. [Support in Server] More...
 
 getTitle ()
 Get annotation's title. [Support in Server] More...
 
 getType ()
 Get annotation's type. [Support in Server] More...
 
 getUniqueID ()
 Get annotation's unique ID. [Support in Server] More...
 
 isEmpty ()
 Check annotation is empty or not. [Support in Server] More...
 
 isMarkup ()
 Check if current annotation is a markup annotation. [Support in Server] More...
 
 setBorderColor (borderColor)
 Set annotation's border color. [Support in Server] More...
 
 setBorderInfo (borderInfo)
 Set annotation's border information. [Support in Server] More...
 
 setContent (content)
 Set contents for the currently gotten annotation. [Support in Server] More...
 
 setDictionaryEntry (key, value)
 Add a new entry or replace the existing entry of the annotation dictionary. Caller could use this method to store their private data to the annotation. Do not use any standard key of the annotation dictionary, such as 'Type', 'Subtype', 'Rect' defined in PDF Reference. If any standard key is used, this behaviour will be undefined. More...
 
 setFlags (flag, notTriggerEvent)
 Set annotation's flag. [Support in Server] More...
 
 setModifiedDateTime (date)
 Set annotation's last modified date time. [Support in Server] More...
 
 setRect (rect)
 Set annotation's rect. More...
 

Detailed Description

Redact annot object.

Member Function Documentation

◆ apply()

Redact::apply ( )
inline

Apply redaction in marked areas. [Support in Server]

Returns
Promise<Array<{pageIndex:number,removedAnnots:number[]}>>

◆ getDefaultAppearance()

Redact::getDefaultAppearance ( )
inline

Get the default appearance data for redact.

t

Returns
{textColor:number,textSize:number} - The default appearance data.
{
textColor: 0xff0000ff,//default appearance's text color,
textSize: 12//default appearance's text size
}
Since
8.3

◆ getFillColor()

Redact::getFillColor ( )
inline

Get redact annotation's fill color.

Returns
number - fill color data.
Since
8.3

◆ getOverlayText()

Redact::getOverlayText ( )
inline

Get the custom redact‘s overlay text.

Returns
string - the redact‘s overlay text.
Since
8.3

◆ getOverlayTextAlignment()

Redact::getOverlayTextAlignment ( )
inline

Get alignment value of overlay text.

Returns
'0'|'1'|'2' - The alignment value.
  • '0' - Specific left alignment to the overlay text of annotation's appearance
  • '1' - Alignment to center
  • '2' - Alignment to right
Since
8.3

◆ getRepeat()

Redact::getRepeat ( )
inline

Get the Repeat status of current redact.

Returns
boolean - The wrapped value means the repeat status of the redact.
Since
8.3

◆ removeOverlayText()

Redact::removeOverlayText ( )
inline

Remove the custom overlay text for redact.

Returns
Promise<boolean> - A boolean value of result. True for success.
Since
8.3

◆ setAutoFontSize()

Redact::setAutoFontSize (   isAutoFontSize)
inline

Set auto font size for current redact.

Parameters
isAutoFontSizeboolean - Whether auto font size.
Returns
Promise<boolean> - A boolean value of result. True for success.
Since
8.3

◆ setDefaultAppearance()

Redact::setDefaultAppearance (   appearance)
inline

Set the default appearance data to redact.

Parameters
appearance{fontName:string,textSize:number,textColor:number} - The default appearance data of the redact will be set.
appearance.fontNamestring - Specified which font type for default appearance.
appearance.textSizenumber - Specified font size for default appearance.
appearance.textColornumber - Specified color for default appearance.
Returns
Promise<boolean> - A boolean value of result. True for success.
Since
8.3

◆ setFillColor()

Redact::setFillColor (   fillColor)
inline

Set the fill color for redact.

Parameters
fillColornumber - specified fill color value for redact.
Returns
Promise<boolean> - A boolean value of result. True for success.
Since
8.3

◆ setOpacity()

Redact::setOpacity (   opacity,
  onlyForFill 
)
inline

Set the opacity value for redact.

Parameters
opacitynumber - redact annotation's opacity value
[onlyForFill=false]boolean - whether only effect on fill color
  • true - only change the fill color's opacity.
  • false - not only change the fill color, but also effect on border's opacity
Returns
Promise<boolean> - A boolean value of result. True for success.
Since
8.3

◆ setOverlayText()

Redact::setOverlayText (   overlayText)
inline

Set the custom overlay text for redact.

Parameters
overlayTextstring - The overlay text string to be set.
Returns
Promise<boolean> - A boolean value of result. True for success.
Since
8.3

◆ setOverlayTextAlignment()

Redact::setOverlayTextAlignment (   alignment)
inline

Set alignment value of overlay text.

Parameters
alignment0|1|2 - The new alignment value.
  • 0 - Specific left alignment to the overlay text of annotation's appearance
  • 1 - Alignment to center
  • 2 - Alignment to right
Returns
Promise<boolean> - A boolean value of result. True for success.
Since
8.3

◆ setRedactApplyFillColor()

Redact::setRedactApplyFillColor (   applyFillColor)
inline

Set the filling color which is used for rollover appearance and will be used after redaction is applied. [Support in Server]

Parameters
applyFillColornumber|['T']|[string,number,number,number]|string - New fill color to be set (alpha is not supported). Supported color format:
  • 0 or ['T'] for transparent
  • number, such as 0xff0000, 16711680
  • PDF color array, such as ['RGB',1,1,1] which means white. Range: 0.0~1.0, The ratio to HTML color format is 1:255.
  • HTML color format, such as '#ff0000', 'rgb(255,0,0)', 'rgba(255,0,0,1)'
Returns
Promise<boolean> - A boolean value of result. True for success, false for failure.

◆ setRepeat()

Redact::setRepeat (   isRepeat)
inline

Set the Repeat status of current redact.

Parameters
isRepeatboolean - The repeat status of the redact will be set.
Returns
Promise<boolean> - A boolean value of result. True for success.
Since
8.3

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