Convert HTML to RTF without trailing paragraph tag

When using the code below, the output text is followed by this block:

{\rtlch\afs24\ltrch\fs24\insrsid10976062\par}

Which automatically creates a new line because as I understand it, we are at the end of a paragraph. Is there a way to avoid this block from being added or prevent a new line from following “This is some text…” ? I don’t care about any of the formatting or paragraph information.

Thank you!

string text = $"<html><body>This is some text..</body></html>";

string rtfString = "";
// Create a document and insert HTML into it.
Aspose.Words.DocumentBuilder builder = new Aspose.Words.DocumentBuilder();
builder.InsertHtml(text);
// Save document to stream as RTF and get RTF string.
using (MemoryStream rtfStream = new MemoryStream())
{
    builder.Document.Save(rtfStream, SaveFormat.Rtf);
    byte[] rtfBytes = rtfStream.ToArray();
    rtfString = Encoding.UTF8.GetString(rtfBytes);
}

Console.WriteLine(rtfString);

@sevenofnine79 This is an end of paragraph. Structure of the generated document is the following:

In MS Word documents text cannot hang in the air, it always belongs to a paragraph. Please see our documentation to learn more about Document Object Model.

Is there another part of aspose words that will let me accomplish this? I dont need to use document. I just need rtf format

@sevenofnine79 I am afraid there is no way to get RTF representation of a particular node using Aspose.Words. You can only get RTF of the whole document.