Foxit PDF SDK

Instance Methods | Properties | List of all members
FSRedact Class Reference
Inheritance diagram for FSRedact:

## Instance Methods
(BOOL) | - apply
| Apply current redact annotation: remove the text, graphics and annotations under annotation rectangle permanently. More...
(void) | - enableAutoFontSize
| Enable auto font size for the overlay text. More...
(void) | - enableRepeatOverlayText:
| Set the flag to decide whether to repeat the overlay text. More...
(FSDefaultAppearance *) | - getDefaultAppearance
| Get default appearance data. More...
(id) | - init
| Constructor.
(id) | - initWithAnnot:
| Constructor, with parent class object. More...
(BOOL) | - isOverlayTextRepeated
| Check whether the overlay text is repeated or not. More...
(BOOL) | - setDefaultAppearance:
| Set default appearance data. More...
Instance Methods inherited from FSMarkup
(FSNote *) | - addReply
| Add a new reply to the end of reply list. More...
(void) | - addRichText:style:
| Add a new rich text string to the end. More...
(FSNote *) | - addStateAnnot:model:state:
| Add a new state annotation. More...
(FSMarkupArray *) | - getGroupElements
| Get an element (as markup annotation) from the group that current markup annotation belongs to. More...
(FSMarkup *) | - getGroupHeader
| Get the header annotation (as primary annotation) of the group that current markup annotation belongs to. More...
(FSNote *) | - getReply:
| Get a reply by index. More...
(int) | - getReplyCount
| Count all replies. More...
(NSString *) | - getRichTextContent:
| Get text string of a rich text string specified by index. More...
(int) | - getRichTextCount
| Get the count of rich text strings. More...
(FSRichTextStyle *) | - getRichTextStyle:
| Get style data of a rich text string specified by index. More...
(FSNoteArray *) | - getStateAnnots:
| Get all state annotations in a specified state model. More...
(void) | - insertRichText:content:style:
| Insert a new rich text string to the place which is specified by index. More...
(BOOL) | - isGrouped
| Check whether current markup annotation is in a group or not. More...
(BOOL) | - removeAllReplies
| Remove all the replies. More...
(BOOL) | - removeAllStateAnnots
| Remove all the state annotations. More...
(BOOL) | - removePopup
| Remove related pop-up annotation. More...
(BOOL) | - removeReply:
| Remove a reply by index. More...
(void) | - removeRichText:
| Remove a rich text string specified by index. More...
(void) | - setRichTextContent:content:
| Set text string of a rich text string specified by index. More...
(void) | - setRichTextStyle:style:
| Set style data of a rich text string specified by index. More...
(BOOL) | - ungroup
| Ungroup current markup annotation from the group it belongs to. More...
Instance Methods inherited from FSAnnot
(BOOL) | - FSMoveWithResetAppearance:is_reset_appearance:
| Move current annotation to a new position, specified by a new rectangle in PDF coordinate system. More...
(BOOL) | - FSResetApStreamWithIsGenerateNewAppearanceObj:
| Reset appearance stream. More...
(FSPDFStream *) | - getAppearanceStream:appearance_state:
| Get annotation's appearance stream with specified type and state. More...
(FSRectI *) | - getDeviceRect:
| Get annotation rectangle in device coordinate system. More...
(FSPDFDictionary *) | - getDict
| Get annotation's dictionary object. More...
(FSMatrix2D *) | - getDisplayMatrix:
| Get the display matrix, from PDF coordinate system to targeted device coordinate system. More...
(int) | - getIndex
| Get the index of current annotation in the page which current annotation belongs to. More...
(FSPDFDictionary *) | - getOptionalContent
| Get the PDF dictionary of annotation's optional content. More...
(FSPDFPage *) | - getPage
| Get the related PDF page. More...
(FSRectF *) | - getRect
| Get rectangle, in PDF coordinate system. More...
(FSAnnotType) | - getType
| Get actual annotation type of current annotation. More...
(BOOL) | - hasProperty:
| Whether current annotation has the specified annotation's property. More...
(id) | - initWithPage:annot_dict:
| Constructor, with PDF page and annotation's PDF dictionary. More...
(BOOL) | - isEmpty
| Check whether current object is empty or not. More...
(BOOL) | - isMarkup
| Check if current annotation is a markup annotation. More...
(BOOL) | - move:
| Move current annotation to a new position, specified by a new rectangle in PDF coordinate system. More...
(BOOL) | - removeProperty:
| Remove a specified annotation's property. More...
(BOOL) | - resetAppearanceStream
| Reset appearance stream. More...

## Properties
unsigned int | applyFillColor
| Get or Set the filling color which is used for rollover appearance and will be used after redaction is applied.
unsigned int | fillColor
| Get or Set fill color.
NSString * | overlayText
| Get or Set the overlay text.
FSAlignment | overlayTextAlignment
| Get or Set alignment value of overlay text. More...
FSQuadPointsArray * | quadPoints
| Get or Set quadrilaterals. More...
Properties inherited from FSMarkup
float | borderOpacity
| Get or Set the border opacity of the annotation.
FSDateTime * | creationDateTime
| Get or Set creation date time.
float | fillOpacity
| Get or Set the fill opacity of the annotation.
NSString * | intent
| Get or Set intent name. More...
float | opacity
| Get or Set opacity value. More...
FSPopup * | popup
| Get or Set related pop-up annotation. More...
NSString * | subject
| Get or Set subject string.
NSString * | title
| Get or Set title string. More...
Properties inherited from FSAnnot
unsigned int | borderColor
| Get or Set border color. More...
FSBorderInfo * | borderInfo
| Get or Set border information. More...
NSString * | content
| Get or Set content.
unsigned int | flags
| Get or Set annotation flags.
FSDateTime * | modifiedDateTime
| Get or Set last modified date time.
NSString * | uniqueID
| Get or Set unique ID.

## Detailed Description

Class FSRedact represents a Foxit custom annotation type (not a standard annotation type). This kind of annotation is used to mark some content of a PDF page and these content will be removed once the redact annotations are applied. An existed redact annotation can be retrieved from PDF page by functions FSPDFPage::getAnnot: and FSPDFPage::getAnnotAtPoint:tolerance:. A new redact annotation would be returned by function FSRedaction::markRedactAnnot:rects:, instead of FSPDFPage::addAnnot:rect:.
Class FSRedact is derived from class FSMarkup and also offers functions to get/set markup annotation's basic properties of a redact annotation. Currently, FSAnnot::borderInfo can be used for a redact annotation, but will not have any effect on the appearance of redact annotation. Besides, redact annotation cannot be moved by function FSAnnot::move:.

See also
  FSRedaction
  FSPDFPage
  FSMarkup

## Method Documentation

## ◆ apply()

- (BOOL) apply |  |  |

Apply current redact annotation: remove the text, graphics and annotations under annotation rectangle permanently.

Once this functions is called successfully, all page content(text object, image object, and path object) and annotations within area of current redact annotation rectangle will be removed permanently. However, if other redaction annotations intersect with or are contained within the current redaction, they will not be deleted. For current redact annotation, it also will be removed (with its pop-up annotation if any) as well - that means current annotation object will be useless when this function succeeds. Area of current redact annotation rectangle will be filled by the color specified by function FSRedact::applyFillColor.

Returns
  YES means success, while NO means failure.

## ◆ enableAutoFontSize()

- (void) enableAutoFontSize |  |  |

Enable auto font size for the overlay text.

Returns
  None.

## ◆ enableRepeatOverlayText:()

- (void) enableRepeatOverlayText: |  | (BOOL) | is_to_repeat_overlay_text |

Set the flag to decide whether to repeat the overlay text.

Parameters

  [in] | is_to_repeat_overlay_text | YES means to repeat the overlay text, while false means not. Default value: NO.

Returns
  None.

## ◆ getDefaultAppearance()

- (FSDefaultAppearance *) getDefaultAppearance |  |  |

Get default appearance data.

This property has effect on redact annotation's appearance. Default appearance data can be used in formatting text.

Returns
  The default appearance data.

## ◆ initWithAnnot:()

- (id) initWithAnnot: |  | (FSAnnot*) | annot |

Constructor, with parent class object.

Parameters

  [in] | annot | Parent class object.

Reimplemented from FSMarkup.

## ◆ isOverlayTextRepeated()

- (BOOL) isOverlayTextRepeated |  |  |

Check whether the overlay text is repeated or not.

Returns
  YES means that the overlay text is repeated, while false means not.

## ◆ setDefaultAppearance:()

- (BOOL) setDefaultAppearance: |  | (FSDefaultAppearance*) | default_ap |

Set default appearance data.

This property has effect on redact annotation's appearance. Default appearance data can be used in formatting text.
If user wants the new default appearance data has effect on annotation's appearance, please call function FSAnnot::resetAppearanceStream after setting new default appearance data.

Parameters

  [in] | default_ap | The new default appearance data to be set. flags of input data can be used to decide which information is/are to be updated with the new data; for those no updated data, they will keep to use old data.

Returns
  YES means success, while NO means failure. Specially, this function will return NO if the parameter default_ap contains any incorrect value, for example:
  - flags of input data includes the FSDefaultAppearanceFlagFont but font of input data is invalid.
  - flags of input data includes the FSDefaultAppearanceFlagFontSize but text size of input data is not bigger than zero.

## Property Documentation

## ◆ overlayTextAlignment

- (FSAlignment) overlayTextAlignment
| read write nonatomic assign

Get or Set alignment value of overlay text.

This property has effect on the overlay text of redact annotation's appearance.

## ◆ quadPoints

- (FSQuadPointsArray *) quadPoints
| read write nonatomic weak

Get or Set quadrilaterals.

The order of points in a quadrilateral should be:

- The first point is the point in left-top corner of the quadrilateral.
- The second point is the point in right-top corner of the quadrilateral.
- The third point is the point in left-bottom corner of the quadrilateral.
- The fourth point is the point in right-bottom corner of the quadrilateral.