I am importing paragraph nodes into another document by using VisitParagraphStart function. But my problem is the original paragraph has a lot of white spaces and unwanted new line characters in beginning and at the end or paragraph, which I need to trim before importing them to new document. Can you please show me how can I trim the beginning and end of paragraphs?
Here is what I need to do:
Public Overrides Function VisitParagraphStart(ByVal paragraph As Aspose.Words.Paragraph) As Aspose.Words.VisitorAction
Dim oCommentDoc As New Document
Dim oImp As New NodeImporter(paragraph.Document, oCommentDoc, ImportFormatMode.KeepSourceFormatting)
‘Here, Before Importing the Nodes, I need to Trim Unwanted spaces.
Dim oTempPara As Paragraph = oImp.ImportNode(Paragraph, True)
Thanks in advance,