Foxit PDF SDK
fsdk.ParagraphEditing Class Reference

Public Member Functions

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...
 

Detailed Description

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

Member Function Documentation

◆ Activate()

def fsdk.ParagraphEditing.Activate ( )

Activate paragraph editing.

Returns
true means succeful, while false means not.

◆ CanCopy()

def fsdk.ParagraphEditing.CanCopy ( )

Check whether can copy text.

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

◆ CanCut()

def fsdk.ParagraphEditing.CanCut ( )

Check whether can cut text.

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

◆ CanDelete()

def fsdk.ParagraphEditing.CanDelete ( )

Check whether can delete text.

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

◆ CanDeselectAll()

def fsdk.ParagraphEditing.CanDeselectAll ( )

Check whether can deselect all text.

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

◆ CanPaste()

def fsdk.ParagraphEditing.CanPaste ( )

Check whether can paste text.

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

◆ CanSelectAll()

def fsdk.ParagraphEditing.CanSelectAll ( )

Check whether can select all text.

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

◆ CopySelected()

def fsdk.ParagraphEditing.CopySelected ( )

Copy the selected text.

Returns
true means success, while false means failure.

◆ CutSelected()

def fsdk.ParagraphEditing.CutSelected ( )

Cut the selected text.

Returns
true means success, while false means failure.

◆ Deactivate()

def fsdk.ParagraphEditing.Deactivate ( )

Deactivate paragraph editing.

Returns
true means success, while false means failure.

◆ Dedent()

def fsdk.ParagraphEditing.Dedent ( )

Decrease indent for text.

Returns
None.

◆ DeleteSelected()

def fsdk.ParagraphEditing.DeleteSelected ( )

Delete the selected text.

Returns
true means success, while false means failure.

◆ DeselectAll()

def fsdk.ParagraphEditing.DeselectAll ( )

Deselect all text.

Returns
true means success, while false means failure.

◆ ExitEditing()

def fsdk.ParagraphEditing.ExitEditing (   is_end_directly)

Exit paragraph editing.

Parameters
[in]is_end_directlyWhether to end editing directly.
Returns
None.

◆ Indent()

def fsdk.ParagraphEditing.Indent ( )

Increase indent for text.

Returns
None.

◆ InsertText()

def fsdk.ParagraphEditing.InsertText (   text)

Call this function when insert text into the page.

Parameters
[in]textThe text to be inserted.
Returns
true means success, while false means failure.

◆ IsEmpty()

def fsdk.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 fsdk.ParagraphEditing.OnChar (   char_code)

Call this function when a character code is being input.

Parameters
[in]char_codeA character code, in UTF16-LE encoding.
Returns
true means success, while false means failure.

◆ OnKeyDown()

def fsdk.ParagraphEditing.OnKeyDown (   key_code)

Call this function when key on the keyboard is down.

Parameters
[in]key_codeThe key code. Please refer to values starting from fsdk.FillerE_VkeyUnknown and this should be one of these values.
Returns
true means success, while false means failure.

◆ OnKeyUp()

def fsdk.ParagraphEditing.OnKeyUp (   key_code)

Call this function when key on the keyboard is up.

Parameters
[in]key_codeThe key code. Please refer to values starting from fsdk.FillerE_VkeyUnknown and this should be one of these values.
Returns
true means success, while false means failure.

◆ OnLButtonDoubleClick()

def fsdk.ParagraphEditing.OnLButtonDoubleClick (   page_index,
  point 
)

Call this function when left mouse button is double clicked.

Parameters
[in]page_indexThe page index.
[in]pointA 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 fsdk.ParagraphEditing.OnLButtonDown (   page_index,
  point 
)

Call this function when left mouse button is down.

Parameters
[in]page_indexThe page index.
[in]pointA point where left mouse button is down in the page, in device coordinate system.
Returns
true means success, while false means failure.

◆ OnLButtonUp()

def fsdk.ParagraphEditing.OnLButtonUp (   page_index,
  point 
)

Call this function when left mouse button is up.

Parameters
[in]page_indexThe page index.
[in]pointA point where left mouse button is up in the page, in device coordinate system.
Returns
true means success, while false means failure.

◆ OnMouseMove()

def fsdk.ParagraphEditing.OnMouseMove (   page_index,
  point 
)

Call this function when mouse moves.

Parameters
[in]page_indexThe page index.
[in]pointA point where the mouse in the page, in device coordinate system.
Returns
true means success, while false means failure.

◆ OnMouseWheel()

def fsdk.ParagraphEditing.OnMouseWheel (   page_index,
  point,
  delta 
)

Call this function when scrolling the mouse wheel.

Parameters
[in]page_indexThe page index.
[in]pointA point where the mouse in the page, in device coordinate system.
[in]deltaIndicates 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 fsdk.ParagraphEditing.PasteSelected ( )

Paste the copied text.

Returns
true means success, while false means failure.

◆ Render()

def fsdk.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 fsdk.ParagraphEditingProviderCallback.GetRenderMatrix .

Parameters
[in]page_index_arrayThe page index array to render.
[in]rendererA valid renderer object for rendering.
Returns
true means success, while false means failure.

◆ SelectAll()

def fsdk.ParagraphEditing.SelectAll ( )

Select all text.

Returns
true means success, while false means failure.

◆ SetAlignment()

def fsdk.ParagraphEditing.SetAlignment (   alignment)

Set text alignment for text.

Parameters
[in]alignmentAlignment value.Please refer to values starting from fsdk.E_AlignmentLeft and this should be one of these values.
Returns
None.

◆ SetBold()

def fsdk.ParagraphEditing.SetBold (   is_bold)

Set bold status for text.

Parameters
[in]is_boldWhether to set selected text as bold. true means current selected text will be set as bold, while false means not.
Returns
None.

◆ SetBulletedList()

def fsdk.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_typeThe type of bullet. Please refer to values starting from and this should be one of these values. None.

◆ SetCharHorizontalScale()

def fsdk.ParagraphEditing.SetCharHorizontalScale (   scale)

Set char horizontal scale for text.

Parameters
[in]scaleThe scale. It should be bigger than 0.
Returns
None.

◆ SetCharSpace()

def fsdk.ParagraphEditing.SetCharSpace (   char_space)

Set char space for text.

Parameters
[in]char_spaceThe char space (unit is 1/72 inch).
Returns
None.

◆ SetFontName()

def fsdk.ParagraphEditing.SetFontName (   font_name)

Set font name for text.

Parameters
[in]font_nameThe font name.
Returns
None.

◆ SetFontSize()

def fsdk.ParagraphEditing.SetFontSize (   font_size)

Set the font size for text.

Parameters
[in]font_sizeThe font size.
Returns
None.

◆ SetItalic()

def fsdk.ParagraphEditing.SetItalic (   is_italic)

Set italic status for text.

Parameters
[in]is_italicWhether to set selected text as italic. true means current selected text will be set as italic, while false means not.
Returns
None.

◆ SetLineSpace()

def fsdk.ParagraphEditing.SetLineSpace (   line_space)

Set line space for text.

Parameters
[in]line_spaceThe line space (unit is 1/72 inch).
Returns
None.

◆ SetNumberedList()

def fsdk.ParagraphEditing.SetNumberedList (   numbering_type)

Set the look of numbering for text.

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

◆ SetParagraphSpacing()

def fsdk.ParagraphEditing.SetParagraphSpacing (   paragraph_space)

Set paragraph spacing for text.

Parameters
[in]paragraph_spaceThe paragraph spacing.
Returns
None.

◆ SetStrikethrough()

def fsdk.ParagraphEditing.SetStrikethrough (   is_striketrough)

Set strikeout word style for text.

Parameters
[in]is_striketroughtrue means to set the strikeout word style, while false means not.
Returns
None.

◆ SetSubscript()

def fsdk.ParagraphEditing.SetSubscript (   is_subscript)

Set the word property of subscript type for text.

Returns
None.

◆ SetSuperscript()

def fsdk.ParagraphEditing.SetSuperscript (   is_superscript)

Set the word property of superscript type for text.

Returns
None.

◆ SetTextColor()

def fsdk.ParagraphEditing.SetTextColor (   text_color)

Set text color for text.

Parameters
[in]text_colorThe text color.
Returns
None.

◆ SetUnderline()

def fsdk.ParagraphEditing.SetUnderline (   is_underline)

Set underline for text.

Parameters
[in]is_underlinetrue means to underline text, while false means not.
Returns
None.

◆ StartEditing()

def fsdk.ParagraphEditing.StartEditing (   page_index,
  start_point,
  end_point 
)

Start paragraph editing.

Parameters
[in]page_indexThe page index.
[in]start_pointA point to start editing on the page, in the device coordinate system.
[in]end_pointA point to end editing on the page, in the device coordinate system.
Returns
None.