Foxit PDF SDK

Public Types | Public Member Functions | List of all members
foxit.addon.pageeditor.ParagraphEditing Class Reference
Inheritance diagram for foxit.addon.pageeditor.ParagraphEditing:

## Public Types
enum | BulletType { BulletType.e_BulletTypeNone = 0, BulletType.e_BulletTypeSolidCircle = 1, BulletType.e_BulletTypeSolidRectangle = 2, BulletType.e_BulletTypeSolidDiamond = 3, BulletType.e_BulletTypeCheck = 4, BulletType.e_BulletTypeRightArrow = 5, BulletType.e_BulletTypeInverseTangentCircle = 6, BulletType.e_BulletTypeDiagonalUpRightArrow = 7, BulletType.e_BulletTypeBlackDiamondMinusWhite = 8 }
| Enumeration for bullet type. More...
enum | NumberingType { NumberingType.e_NumberingTypeNone = 0, NumberingType.e_NumberingTypeDecimalDot = 1, NumberingType.e_NumberingTypeDecimalRParen = 2, NumberingType.e_NumberingTypeUpperLatinDot = 3, NumberingType.e_NumberingTypeLowerLatinRParen = 4, NumberingType.e_NumberingTypeLowerLatinDot = 5 }
| Enumeration for numbering type. More...

## Public Member Functions
| ParagraphEditing (ParagraphEditing other)
| Constructor, with another paragraph edit object. More...
bool | Activate ()
| Activate paragraph editing. More...
bool | CanCopy ()
| Check whether can copy text. More...
bool | CanCut ()
| Check whether can cut text. More...
bool | CanDelete ()
| Check whether can delete text. More...
bool | CanDeselectAll ()
| Check whether can deselect all text. More...
bool | CanPaste ()
| Check whether can paste text. More...
bool | CanSelectAll ()
| Check whether can select all text. More...
bool | CopySelected ()
| Copy the selected text. More...
bool | CutSelected ()
| Cut the selected text. More...
bool | Deactivate ()
| Deactivate paragraph editing. More...
void | Dedent ()
| Decrease indent for text. More...
bool | DeleteSelected ()
| Delete the selected text. More...
bool | DeselectAll ()
| Deselect all text. More...
void | ExitEditing (bool is_end_directly)
| Exit paragraph editing. More...
void | Indent ()
| Increase indent for text. More...
bool | InsertText (string text)
| Call this function when insert text into the page. More...
bool | IsEmpty ()
| Check whether current object is empty or not. More...
bool | OnChar (int char_code)
| Call this function when a character code is being input. More...
bool | OnKeyDown (int key_code)
| Call this function when key on the keyboard is down. More...
bool | OnKeyUp (int key_code)
| Call this function when key on the keyboard is up. More...
bool | OnLButtonDoubleClick (int page_index, PointF point)
| Call this function when left mouse button is double clicked. More...
bool | OnLButtonDown (int page_index, PointF point)
| Call this function when left mouse button is down. More...
bool | OnLButtonUp (int page_index, PointF point)
| Call this function when left mouse button is up. More...
bool | OnMouseMove (int page_index, PointF point)
| Call this function when mouse moves. More...
bool | OnMouseWheel (int page_index, PointF point, int delta)
| Call this function when scrolling the mouse wheel. More...
bool | PasteSelected ()
| Paste the copied text. More...
bool | Render (Int32Array page_index_array, Renderer renderer)
| Draw the current paragraph editing operation status on the rendering. More...
bool | SelectAll ()
| Select all text. More...
void | SetAlignment (Alignment alignment)
| Set text alignment for text. More...
void | SetBold (bool is_bold)
| Set bold status for text. More...
void | SetBulletedList (ParagraphEditing.BulletType bullet_type)
| Set bullet list for text. More...
void | SetCharHorizontalScale (int scale)
| Set char horizontal scale for text. More...
void | SetCharSpace (float char_space)
| Set char space for text. More...
void | SetFontName (string font_name)
| Set font name for text. More...
void | SetFontSize (float font_size)
| Set the font size for text. More...
void | SetItalic (bool is_italic)
| Set italic status for text. More...
void | SetLineSpace (float line_space)
| Set line space for text. More...
void | SetNumberedList (ParagraphEditing.NumberingType numbering_type)
| Set the look of numbering for text. More...
void | SetParagraphSpacing (float paragraph_space)
| Set paragraph spacing for text. More...
void | SetStrikethrough (bool is_striketrough)
| Set strikeout word style for text. More...
void | SetSubscript (bool is_subscript)
| Set the word property of subscript type for text. More...
void | SetSuperscript (bool is_superscript)
| Set the word property of superscript type for text. More...
void | SetTextColor (int text_color)
| Set text color for text. More...
void | SetUnderline (bool is_underline)
| Set underline for text. More...
void | StartEditing (int page_index, PointF start_point, PointF end_point)
| Start paragraph editing. More...

## Detailed Description

This class represents a paragraph edit operation. Before use any methods of paragraph edit function, please ensure the function ParagraphEditing.Activate has been called. Please call the function ParagraphEditing.Deactivate to deactivate when no need to use any paragraph edit function.

## Member Enumeration Documentation

## ◆ BulletType

enum foxit.addon.pageeditor.ParagraphEditing.BulletType
| strong

Enumeration for bullet type.

Values of this enumeration should be used alone.

Enumerator
e_BulletTypeNone | Bullet type: none.
e_BulletTypeSolidCircle | Bullet type: solid circle.
e_BulletTypeSolidRectangle | Bullet type: solid rectangle.
e_BulletTypeSolidDiamond | Bullet type: solid diamond.
e_BulletTypeCheck | Bullet type: check.
e_BulletTypeRightArrow | Bullet type: right arrow (upper white and lower black).
e_BulletTypeInverseTangentCircle | Bullet type: inverse tangent circle.
e_BulletTypeDiagonalUpRightArrow | Bullet type: diagonal up right arrow.
e_BulletTypeBlackDiamondMinusWhite | Bullet type: black diamond minus white.

## ◆ NumberingType

enum foxit.addon.pageeditor.ParagraphEditing.NumberingType
| strong

Enumeration for numbering type.

Values of this enumeration should be used alone.

Enumerator
e_NumberingTypeNone | Numbering type: none.
e_NumberingTypeDecimalDot | Numbering type: 1. 2. 3.
e_NumberingTypeDecimalRParen | Numbering type: 1) 2) 3)
e_NumberingTypeUpperLatinDot | Numbering type: A. B. C.
e_NumberingTypeLowerLatinRParen | Numbering type: a) b) c)
e_NumberingTypeLowerLatinDot | Numbering type: a. b. c.

## Constructor & Destructor Documentation

## ◆ ParagraphEditing()

foxit.addon.pageeditor.ParagraphEditing.ParagraphEditing | ( | ParagraphEditing | other | ) |
| inline

Constructor, with another paragraph edit object.

Parameters

  [in] | other | Another paragraph edit object.

## Member Function Documentation

## ◆ Activate()

bool foxit.addon.pageeditor.ParagraphEditing.Activate | ( |  | ) |
| inline

Activate paragraph editing.

Returns
  true means succeful, while false means not.

## ◆ CanCopy()

bool foxit.addon.pageeditor.ParagraphEditing.CanCopy | ( |  | ) |
| inline

Check whether can copy text.

Returns
  true means current selected text object can be copied, while false means not.

## ◆ CanCut()

bool foxit.addon.pageeditor.ParagraphEditing.CanCut | ( |  | ) |
| inline

Check whether can cut text.

Returns
  true means current selected text can be cut, while false means not.

## ◆ CanDelete()

bool foxit.addon.pageeditor.ParagraphEditing.CanDelete | ( |  | ) |
| inline

Check whether can delete text.

Returns
  true means current selected text can be deleted, while false means not.

## ◆ CanDeselectAll()

bool foxit.addon.pageeditor.ParagraphEditing.CanDeselectAll | ( |  | ) |
| inline

Check whether can deselect all text.

Returns
  true means current selected text can be deselected, while false means not.

## ◆ CanPaste()

bool foxit.addon.pageeditor.ParagraphEditing.CanPaste | ( |  | ) |
| inline

Check whether can paste text.

Returns
  true means current selected text can be pasted, while false means not.

## ◆ CanSelectAll()

bool foxit.addon.pageeditor.ParagraphEditing.CanSelectAll | ( |  | ) |
| inline

Check whether can select all text.

Returns
  true means current all text can be selected, while false means not.

## ◆ CopySelected()

bool foxit.addon.pageeditor.ParagraphEditing.CopySelected | ( |  | ) |
| inline

Copy the selected text.

Returns
  true means success, while false means failure.

## ◆ CutSelected()

bool foxit.addon.pageeditor.ParagraphEditing.CutSelected | ( |  | ) |
| inline

Cut the selected text.

Returns
  true means success, while false means failure.

## ◆ Deactivate()

bool foxit.addon.pageeditor.ParagraphEditing.Deactivate | ( |  | ) |
| inline

Deactivate paragraph editing.

Returns
  true means success, while false means failure.

## ◆ Dedent()

void foxit.addon.pageeditor.ParagraphEditing.Dedent | ( |  | ) |
| inline

Decrease indent for text.

Returns
  None.

## ◆ DeleteSelected()

bool foxit.addon.pageeditor.ParagraphEditing.DeleteSelected | ( |  | ) |
| inline

Delete the selected text.

Returns
  true means success, while false means failure.

## ◆ DeselectAll()

bool foxit.addon.pageeditor.ParagraphEditing.DeselectAll | ( |  | ) |
| inline

Deselect all text.

Returns
  true means success, while false means failure.

## ◆ ExitEditing()

void foxit.addon.pageeditor.ParagraphEditing.ExitEditing | ( | bool | is_end_directly | ) |
| inline

Exit paragraph editing.

Parameters

  [in] | is_end_directly | Whether to end editing directly.

Returns
  None.

## ◆ Indent()

void foxit.addon.pageeditor.ParagraphEditing.Indent | ( |  | ) |
| inline

Increase indent for text.

Returns
  None.

## ◆ InsertText()

bool foxit.addon.pageeditor.ParagraphEditing.InsertText | ( | string | text | ) |
| inline

Call this function when insert text into the page.

Parameters

  [in] | text | The text to be inserted.

Returns
  true means success, while false means failure.

## ◆ IsEmpty()

bool foxit.addon.pageeditor.ParagraphEditing.IsEmpty | ( |  | ) |
| inline

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.

## ◆ OnChar()

bool foxit.addon.pageeditor.ParagraphEditing.OnChar | ( | int | char_code | ) |
| inline

Call this function when a character code is being input.

Parameters

  [in] | char_code | A character code, in UTF16-LE encoding.

Returns
  true means success, while false means failure.

## ◆ OnKeyDown()

bool foxit.addon.pageeditor.ParagraphEditing.OnKeyDown | ( | int | key_code | ) |
| inline

Call this function when key on the keyboard is down.

Parameters

  [in] | key_code | The key code. Please refer to values starting from foxit.pdf.interform.Filler.VirtualKeyCode.e_VkeyUnknown and this should be one of these values.

Returns
  true means success, while false means failure.

## ◆ OnKeyUp()

bool foxit.addon.pageeditor.ParagraphEditing.OnKeyUp | ( | int | key_code | ) |
| inline

Call this function when key on the keyboard is up.

Parameters

  [in] | key_code | The key code. Please refer to values starting from foxit.pdf.interform.Filler.VirtualKeyCode.e_VkeyUnknown and this should be one of these values.

Returns
  true means success, while false means failure.

## ◆ OnLButtonDoubleClick()

bool foxit.addon.pageeditor.ParagraphEditing.OnLButtonDoubleClick | ( | int | page_index,
|  | PointF | point
| ) |  |
| inline

Call this function when left mouse button is double clicked.

Parameters

  [in] | page_index | The page index.
  [in] | point | A point where left mouse button is double-clicked in the page, in device coordinate system.

Returns
  true means success, while false means failure.

## ◆ OnLButtonDown()

bool foxit.addon.pageeditor.ParagraphEditing.OnLButtonDown | ( | int | page_index,
|  | PointF | point
| ) |  |
| inline

Call this function when left mouse button is down.

Parameters

  [in] | page_index | The page index.
  [in] | point | A point where left mouse button is down in the page, in device coordinate system.

Returns
  true means success, while false means failure.

## ◆ OnLButtonUp()

bool foxit.addon.pageeditor.ParagraphEditing.OnLButtonUp | ( | int | page_index,
|  | PointF | point
| ) |  |
| inline

Call this function when left mouse button is up.

Parameters

  [in] | page_index | The page index.
  [in] | point | A point where left mouse button is up in the page, in device coordinate system.

Returns
  true means success, while false means failure.

## ◆ OnMouseMove()

bool foxit.addon.pageeditor.ParagraphEditing.OnMouseMove | ( | int | page_index,
|  | PointF | point
| ) |  |
| inline

Call this function when mouse moves.

Parameters

  [in] | page_index | The page index.
  [in] | point | A point where the mouse in the page, in device coordinate system.

Returns
  true means success, while false means failure.

## ◆ OnMouseWheel()

bool foxit.addon.pageeditor.ParagraphEditing.OnMouseWheel | ( | int | page_index,
|  | PointF | point,
|  | int | delta
| ) |  |
| inline

Call this function when scrolling the mouse wheel.

Parameters

  [in] | page_index | The page index.
  [in] | point | A point where the mouse in the page, in device coordinate system.
  [in] | delta | Indicates the amount the mouse wheel has been moved. A positive value means to be moved forward, and a negative value means to be moved backward.

Returns
  true means success, while false means failure.

## ◆ PasteSelected()

bool foxit.addon.pageeditor.ParagraphEditing.PasteSelected | ( |  | ) |
| inline

Paste the copied text.

Returns
  true means success, while false means failure.

## ◆ Render()

bool foxit.addon.pageeditor.ParagraphEditing.Render | ( | Int32Array | page_index_array,
|  | Renderer | renderer
| ) |  |
| inline

Draw the current paragraph editing operation status on the rendering.

The matrix used in the rendering process is returned by ParagraphEditingProviderCallback.GetRenderMatrix .

Parameters

  [in] | page_index_array | The page index array to render.
  [in] | renderer | A valid renderer object for rendering.

Returns
  true means success, while false means failure.

## ◆ SelectAll()

bool foxit.addon.pageeditor.ParagraphEditing.SelectAll | ( |  | ) |
| inline

Select all text.

Returns
  true means success, while false means failure.

## ◆ SetAlignment()

void foxit.addon.pageeditor.ParagraphEditing.SetAlignment | ( | Alignment | alignment | ) |
| inline

Set text alignment for text.

Parameters

  [in] | alignment | Alignment value.Please refer to values starting from foxit.common.Alignment.e_AlignmentLeft and this should be one of these values.

Returns
  None.

## ◆ SetBold()

void foxit.addon.pageeditor.ParagraphEditing.SetBold | ( | bool | is_bold | ) |
| inline

Set bold status for text.

Parameters

  [in] | is_bold | Whether to set selected text as bold. true means current selected text will be set as bold, while false means not.

Returns
  None.

## ◆ SetBulletedList()

void foxit.addon.pageeditor.ParagraphEditing.SetBulletedList | ( | ParagraphEditing.BulletType | bullet_type | ) |
| inline

Set bullet list for text.

Before setting a bullet list, ensure the "wingding.ttf" font has been installed.

Parameters

  [in] | bullet_type | The type of bullet. Please refer to values starting from and this should be one of these values. None.

## ◆ SetCharHorizontalScale()

void foxit.addon.pageeditor.ParagraphEditing.SetCharHorizontalScale | ( | int | scale | ) |
| inline

Set char horizontal scale for text.

Parameters

  [in] | scale | The scale. It should be bigger than 0.

Returns
  None.

## ◆ SetCharSpace()

void foxit.addon.pageeditor.ParagraphEditing.SetCharSpace | ( | float | char_space | ) |
| inline

Set char space for text.

Parameters

  [in] | char_space | The char space (unit is 1/72 inch).

Returns
  None.

## ◆ SetFontName()

void foxit.addon.pageeditor.ParagraphEditing.SetFontName | ( | string | font_name | ) |
| inline

Set font name for text.

Parameters

  [in] | font_name | The font name.

Returns
  None.

## ◆ SetFontSize()

void foxit.addon.pageeditor.ParagraphEditing.SetFontSize | ( | float | font_size | ) |
| inline

Set the font size for text.

Parameters

  [in] | font_size | The font size.

Returns
  None.

## ◆ SetItalic()

void foxit.addon.pageeditor.ParagraphEditing.SetItalic | ( | bool | is_italic | ) |
| inline

Set italic status for text.

Parameters

  [in] | is_italic | Whether to set selected text as italic. true means current selected text will be set as italic, while false means not.

Returns
  None.

## ◆ SetLineSpace()

void foxit.addon.pageeditor.ParagraphEditing.SetLineSpace | ( | float | line_space | ) |
| inline

Set line space for text.

Parameters

  [in] | line_space | The line space (unit is 1/72 inch).

Returns
  None.

## ◆ SetNumberedList()

void foxit.addon.pageeditor.ParagraphEditing.SetNumberedList | ( | ParagraphEditing.NumberingType | numbering_type | ) |
| inline

Set the look of numbering for text.

Parameters

  [in] | numbering_type | The type of numbering. Please refer to values starting from and this should be one of these values. None.

## ◆ SetParagraphSpacing()

void foxit.addon.pageeditor.ParagraphEditing.SetParagraphSpacing | ( | float | paragraph_space | ) |
| inline

Set paragraph spacing for text.

Parameters

  [in] | paragraph_space | The paragraph spacing.

Returns
  None.

## ◆ SetStrikethrough()

void foxit.addon.pageeditor.ParagraphEditing.SetStrikethrough | ( | bool | is_striketrough | ) |
| inline

Set strikeout word style for text.

Parameters

  [in] | is_striketrough | true means to set the strikeout word style, while false means not.

Returns
  None.

## ◆ SetSubscript()

void foxit.addon.pageeditor.ParagraphEditing.SetSubscript | ( | bool | is_subscript | ) |
| inline

Set the word property of subscript type for text.

Returns
  None.

## ◆ SetSuperscript()

void foxit.addon.pageeditor.ParagraphEditing.SetSuperscript | ( | bool | is_superscript | ) |
| inline

Set the word property of superscript type for text.

Returns
  None.

## ◆ SetTextColor()

void foxit.addon.pageeditor.ParagraphEditing.SetTextColor | ( | int | text_color | ) |
| inline

Set text color for text.

Parameters

  [in] | text_color | The text color.

Returns
  None.

## ◆ SetUnderline()

void foxit.addon.pageeditor.ParagraphEditing.SetUnderline | ( | bool | is_underline | ) |
| inline

Set underline for text.

Parameters

  [in] | is_underline | true means to underline text, while false means not.

Returns
  None.

## ◆ StartEditing()

void foxit.addon.pageeditor.ParagraphEditing.StartEditing | ( | int | page_index,
|  | PointF | start_point,
|  | PointF | end_point
| ) |  |
| inline

Start paragraph editing.

Parameters

  [in] | page_index | The page index.
  [in] | start_point | A point to start editing on the page, in the device coordinate system.
  [in] | end_point | A point to end editing on the page, in the device coordinate system.

Returns
  None.