Text alignment after replacement in a paragraph

I am using Aspose software for pdf generation but having issues while replacing text using TextFragment. Suppose I have a text in a table column with replacement parameter.

My name is
@name@
and I am from
@place@.

If I replace with some text, the next line does not get pulled automatically.

My name is
KK
and I am from
XXX

but it should produce result like

My name is
KK and I am
from XXX.

        var textFragmentAbsorber = new TextFragmentAbsorber(searchPattern) { TextSearchOptions = new TextSearchOptions(true) };
        textFragmentAbsorber.TextReplaceOptions = new TextReplaceOptions(ReplaceAdjustment.AdjustSpaceWidth);

        pdfDoc.Pages.Accept(textFragmentAbsorber);

        if (textFragmentAbsorber.TextFragments != null)
        {
            foreach (TextFragment tf in textFragmentAbsorber.TextFragments)
            {
		if (tf.Text.Equals("name"))
                	{
                    tf.Text = "KK"
		}
            }
        }

@nisg55

Thank you for contacting support.

I would like to request you to share the source and generated PDF file along with a complete code snippet reproducing this issue, as searchPattern is not specified in the code you have shared with us already. Kindly share requested data so that we may proceed to help you out.