Aspose::Pdf::Facades::PdfContentEditor::ReplaceText method

PdfContentEditor::ReplaceText(const System::String&, const System::String&) method

Replaces text in the PDF file.

bool Aspose::Pdf::Facades::PdfContentEditor::ReplaceText(const System::String &srcString, const System::String &destString)
ParameterTypeDescription
srcStringconst System::String&The string to be replaced.
destStringconst System::String&Replacing string.

ReturnValue

Returns true if replacement was made.

See Also

PdfContentEditor::ReplaceText(const System::String&, const System::String&, const System::SharedPtr<Text::TextState>&) method

Replaces text in the PDF file using specified TextState object.

bool Aspose::Pdf::Facades::PdfContentEditor::ReplaceText(const System::String &srcString, const System::String &destString, const System::SharedPtr<Text::TextState> &textState)
ParameterTypeDescription
srcStringconst System::String&String to be replaced
destStringconst System::String&Replacing string
textStateconst System::SharedPtr<Text::TextState>&Text state (TextColor, Font etc)

ReturnValue

Returns true if replacement was made.

See Also

PdfContentEditor::ReplaceText(const System::String&, const System::String&, int32_t) method

Replaces text in the PDF file and sets font size.

bool Aspose::Pdf::Facades::PdfContentEditor::ReplaceText(const System::String &srcString, const System::String &destString, int32_t fontSize)
ParameterTypeDescription
srcStringconst System::String&String to be replaced.
destStringconst System::String&Replacing string.
fontSizeint32_tFont size.

ReturnValue

Returns true if replacement was made.

See Also

PdfContentEditor::ReplaceText(const System::String&, int32_t, const System::String&) method

Replaces text in the PDF file on the specified page.

bool Aspose::Pdf::Facades::PdfContentEditor::ReplaceText(const System::String &srcString, int32_t thePage, const System::String &destString)
ParameterTypeDescription
srcStringconst System::String&The sting to be replaced.
thePageint32_tPage number (0 for all pages)
destStringconst System::String&Replacing string.

ReturnValue

Returns true if replacement was made.

See Also

PdfContentEditor::ReplaceText(const System::String&, int32_t, const System::String&, const System::SharedPtr<Text::TextState>&) method

Replaces text in the PDF file on the specified page. TextState object (font family, color) can be specified to replaced text.

bool Aspose::Pdf::Facades::PdfContentEditor::ReplaceText(const System::String &srcString, int32_t thePage, const System::String &destString, const System::SharedPtr<Text::TextState> &textState)
ParameterTypeDescription
srcStringconst System::String&The string to be replaced.
thePageint32_tPage number (0 means “all pages”).
destStringconst System::String&The replaced string.
textStateconst System::SharedPtr<Text::TextState>&Text state (TextColor, Font etc).

ReturnValue

Returns true if replacement was made.

See Also