Foxit PDF SDK

Public Member Functions | Static Public Attributes | List of all members
FoxitPDFSDKPython2.ParagraphEditing Class Reference
Inheritance diagram for FoxitPDFSDKPython2.ParagraphEditing:

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

## Static Public Attributes
| e_BulletTypeBlackDiamondMinusWhite = _fsdk.ParagraphEditing_e_BulletTypeBlackDiamondMinusWhite
| Bullet type: black diamond minus white.
| e_BulletTypeCheck = _fsdk.ParagraphEditing_e_BulletTypeCheck
| Bullet type: check.
| e_BulletTypeDiagonalUpRightArrow = _fsdk.ParagraphEditing_e_BulletTypeDiagonalUpRightArrow
| Bullet type: diagonal up right arrow.
| e_BulletTypeInverseTangentCircle = _fsdk.ParagraphEditing_e_BulletTypeInverseTangentCircle
| Bullet type: inverse tangent circle.
| e_BulletTypeNone = _fsdk.ParagraphEditing_e_BulletTypeNone
| Bullet type: none.
| e_BulletTypeRightArrow = _fsdk.ParagraphEditing_e_BulletTypeRightArrow
| Bullet type: right arrow (upper white and lower black).
| e_BulletTypeSolidCircle = _fsdk.ParagraphEditing_e_BulletTypeSolidCircle
| Bullet type: solid circle.
| e_BulletTypeSolidDiamond = _fsdk.ParagraphEditing_e_BulletTypeSolidDiamond
| Bullet type: solid diamond.
| e_BulletTypeSolidRectangle = _fsdk.ParagraphEditing_e_BulletTypeSolidRectangle
| Bullet type: solid rectangle.
| e_NumberingTypeDecimalDot = _fsdk.ParagraphEditing_e_NumberingTypeDecimalDot
| Numbering type: 1. 2. 3.
| e_NumberingTypeDecimalRParen = _fsdk.ParagraphEditing_e_NumberingTypeDecimalRParen
| Numbering type: 1) 2) 3)
| e_NumberingTypeLowerLatinDot = _fsdk.ParagraphEditing_e_NumberingTypeLowerLatinDot
| Numbering type: a. b. c.
| e_NumberingTypeLowerLatinRParen = _fsdk.ParagraphEditing_e_NumberingTypeLowerLatinRParen
| Numbering type: a) b) c)
| e_NumberingTypeNone = _fsdk.ParagraphEditing_e_NumberingTypeNone
| Numbering type: none.
| e_NumberingTypeUpperLatinDot = _fsdk.ParagraphEditing_e_NumberingTypeUpperLatinDot
| Numbering type: A. B. C.

## Detailed Description

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

## Constructor & Destructor Documentation

## ◆ ParagraphEditing()

def FoxitPDFSDKPython2.ParagraphEditing.ParagraphEditing | ( |  | other | ) |

Constructor, with another paragraph edit object.

Parameters

  [in] | other | Another paragraph edit object.

## Member Function Documentation

## ◆ Activate()

def FoxitPDFSDKPython2.ParagraphEditing.Activate | ( |  | ) |

Activate paragraph editing.

Returns
  true means succeful, while false means not.

## ◆ CanCopy()

def FoxitPDFSDKPython2.ParagraphEditing.CanCopy | ( |  | ) |

Check whether can copy text.

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

## ◆ CanCut()

def FoxitPDFSDKPython2.ParagraphEditing.CanCut | ( |  | ) |

Check whether can cut text.

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

## ◆ CanDelete()

def FoxitPDFSDKPython2.ParagraphEditing.CanDelete | ( |  | ) |

Check whether can delete text.

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

## ◆ CanDeselectAll()

def FoxitPDFSDKPython2.ParagraphEditing.CanDeselectAll | ( |  | ) |

Check whether can deselect all text.

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

## ◆ CanPaste()

def FoxitPDFSDKPython2.ParagraphEditing.CanPaste | ( |  | ) |

Check whether can paste text.

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

## ◆ CanSelectAll()

def FoxitPDFSDKPython2.ParagraphEditing.CanSelectAll | ( |  | ) |

Check whether can select all text.

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

## ◆ CopySelected()

def FoxitPDFSDKPython2.ParagraphEditing.CopySelected | ( |  | ) |

Copy the selected text.

Returns
  true means success, while false means failure.

## ◆ CutSelected()

def FoxitPDFSDKPython2.ParagraphEditing.CutSelected | ( |  | ) |

Cut the selected text.

Returns
  true means success, while false means failure.

## ◆ Deactivate()

def FoxitPDFSDKPython2.ParagraphEditing.Deactivate | ( |  | ) |

Deactivate paragraph editing.

Returns
  true means success, while false means failure.

## ◆ Dedent()

def FoxitPDFSDKPython2.ParagraphEditing.Dedent | ( |  | ) |

Decrease indent for text.

Returns
  None.

## ◆ DeleteSelected()

def FoxitPDFSDKPython2.ParagraphEditing.DeleteSelected | ( |  | ) |

Delete the selected text.

Returns
  true means success, while false means failure.

## ◆ DeselectAll()

def FoxitPDFSDKPython2.ParagraphEditing.DeselectAll | ( |  | ) |

Deselect all text.

Returns
  true means success, while false means failure.

## ◆ ExitEditing()

def FoxitPDFSDKPython2.ParagraphEditing.ExitEditing | ( |  | is_end_directly | ) |

Exit paragraph editing.

Parameters

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

Returns
  None.

## ◆ Indent()

def FoxitPDFSDKPython2.ParagraphEditing.Indent | ( |  | ) |

Increase indent for text.

Returns
  None.

## ◆ InsertText()

def FoxitPDFSDKPython2.ParagraphEditing.InsertText | ( |  | text | ) |

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()

def FoxitPDFSDKPython2.ParagraphEditing.IsEmpty | ( |  | ) |

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()

def FoxitPDFSDKPython2.ParagraphEditing.OnChar | ( |  | char_code | ) |

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()

def FoxitPDFSDKPython2.ParagraphEditing.OnKeyDown | ( |  | key_code | ) |

Call this function when key on the keyboard is down.

Parameters

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

Returns
  true means success, while false means failure.

## ◆ OnKeyUp()

def FoxitPDFSDKPython2.ParagraphEditing.OnKeyUp | ( |  | key_code | ) |

Call this function when key on the keyboard is up.

Parameters

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

Returns
  true means success, while false means failure.

## ◆ OnLButtonDoubleClick()

def FoxitPDFSDKPython2.ParagraphEditing.OnLButtonDoubleClick | ( |  | page_index,
|  |  | point
| ) |  |

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()

def FoxitPDFSDKPython2.ParagraphEditing.OnLButtonDown | ( |  | page_index,
|  |  | point
| ) |  |

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()

def FoxitPDFSDKPython2.ParagraphEditing.OnLButtonUp | ( |  | page_index,
|  |  | point
| ) |  |

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()

def FoxitPDFSDKPython2.ParagraphEditing.OnMouseMove | ( |  | page_index,
|  |  | point
| ) |  |

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()

def FoxitPDFSDKPython2.ParagraphEditing.OnMouseWheel | ( |  | page_index,
|  |  | point,
|  |  | delta
| ) |  |

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()

def FoxitPDFSDKPython2.ParagraphEditing.PasteSelected | ( |  | ) |

Paste the copied text.

Returns
  true means success, while false means failure.

## ◆ Render()

def FoxitPDFSDKPython2.ParagraphEditing.Render | ( |  | page_index_array,
|  |  | renderer
| ) |  |

Draw the current paragraph editing operation status on the rendering.

The matrix used in the rendering process is returned by FoxitPDFSDKPython2.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()

def FoxitPDFSDKPython2.ParagraphEditing.SelectAll | ( |  | ) |

Select all text.

Returns
  true means success, while false means failure.

## ◆ SetAlignment()

def FoxitPDFSDKPython2.ParagraphEditing.SetAlignment | ( |  | alignment | ) |

Set text alignment for text.

Parameters

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

Returns
  None.

## ◆ SetBold()

def FoxitPDFSDKPython2.ParagraphEditing.SetBold | ( |  | is_bold | ) |

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()

def FoxitPDFSDKPython2.ParagraphEditing.SetBulletedList | ( |  | bullet_type | ) |

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.

Returns
  None.

## ◆ SetCharHorizontalScale()

def FoxitPDFSDKPython2.ParagraphEditing.SetCharHorizontalScale | ( |  | scale | ) |

Set char horizontal scale for text.

Parameters

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

Returns
  None.

## ◆ SetCharSpace()

def FoxitPDFSDKPython2.ParagraphEditing.SetCharSpace | ( |  | char_space | ) |

Set char space for text.

Parameters

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

Returns
  None.

## ◆ SetFontName()

def FoxitPDFSDKPython2.ParagraphEditing.SetFontName | ( |  | font_name | ) |

Set font name for text.

Parameters

  [in] | font_name | The font name.

Returns
  None.

## ◆ SetFontSize()

def FoxitPDFSDKPython2.ParagraphEditing.SetFontSize | ( |  | font_size | ) |

Set the font size for text.

Parameters

  [in] | font_size | The font size.

Returns
  None.

## ◆ SetItalic()

def FoxitPDFSDKPython2.ParagraphEditing.SetItalic | ( |  | is_italic | ) |

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()

def FoxitPDFSDKPython2.ParagraphEditing.SetLineSpace | ( |  | line_space | ) |

Set line space for text.

Parameters

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

Returns
  None.

## ◆ SetNumberedList()

def FoxitPDFSDKPython2.ParagraphEditing.SetNumberedList | ( |  | numbering_type | ) |

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.

Returns
  None.

## ◆ SetParagraphSpacing()

def FoxitPDFSDKPython2.ParagraphEditing.SetParagraphSpacing | ( |  | paragraph_space | ) |

Set paragraph spacing for text.

Parameters

  [in] | paragraph_space | The paragraph spacing.

Returns
  None.

## ◆ SetStrikethrough()

def FoxitPDFSDKPython2.ParagraphEditing.SetStrikethrough | ( |  | is_striketrough | ) |

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()

def FoxitPDFSDKPython2.ParagraphEditing.SetSubscript | ( |  | is_subscript | ) |

Set the word property of subscript type for text.

Returns
  None.

## ◆ SetSuperscript()

def FoxitPDFSDKPython2.ParagraphEditing.SetSuperscript | ( |  | is_superscript | ) |

Set the word property of superscript type for text.

Returns
  None.

## ◆ SetTextColor()

def FoxitPDFSDKPython2.ParagraphEditing.SetTextColor | ( |  | text_color | ) |

Set text color for text.

Parameters

  [in] | text_color | The text color.

Returns
  None.

## ◆ SetUnderline()

def FoxitPDFSDKPython2.ParagraphEditing.SetUnderline | ( |  | is_underline | ) |

Set underline for text.

Parameters

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

Returns
  None.

## ◆ StartEditing()

def FoxitPDFSDKPython2.ParagraphEditing.StartEditing | ( |  | page_index,
|  |  | start_point,
|  |  | end_point
| ) |  |

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.