[]
        
(Showing Draft Content)

GrapeCity.Documents.Pdf.Page.ReplaceText

ReplaceText Method

ReplaceText(FindTextParams, string, Font, float?)

Replaces a specified text on the current page.

Note that the results may be affected by the current value of the RecognitionAlgorithm property.

Declaration
public void ReplaceText(FindTextParams findTextParams, string newText, Font font = null, float? fontSize = null)
Public Sub ReplaceText(findTextParams As FindTextParams, newText As String, Optional font As Font = Nothing, Optional fontSize As Single? = Nothing)
Parameters
Type Name Description
FindTextParams findTextParams

The text to search for.

string newText

The replacement text.

Font font

The font to use on newText, if null the current font will be used.

float? fontSize

The font size to use on newText, if null the current font size will be used.

ReplaceText(ViewState, TextMapFragment, string, Font, float?)

Replaces a specified text range on the current page.

Declaration
public void ReplaceText(ViewState viewState, TextMapFragment fragment, string newText, Font font = null, float? fontSize = null)
Public Sub ReplaceText(viewState As ViewState, fragment As TextMapFragment, newText As String, Optional font As Font = Nothing, Optional fontSize As Single? = Nothing)
Parameters
Type Name Description
ViewState viewState

The ViewState used to determine what document content should be considered.

TextMapFragment fragment

The text range.

string newText

The replacement text.

Font font

The font to use on newText, if null the current font will be used.

float? fontSize

The font size to use on newText, if null the current font size will be used.

ReplaceText(TextMapFragment, string, Font, float?)

Replaces a specified text range on the current page.

Declaration
public void ReplaceText(TextMapFragment fragment, string newText, Font font = null, float? fontSize = null)
Public Sub ReplaceText(fragment As TextMapFragment, newText As String, Optional font As Font = Nothing, Optional fontSize As Single? = Nothing)
Parameters
Type Name Description
TextMapFragment fragment

The text range.

string newText

The replacement text.

Font font

The font to use on newText, if null the current font will be used.

float? fontSize

The font size to use on newText, if null the current font size will be used.