Is there any ways can be used to clear formating of previous paragraph?

Hi Support,

What the purpose of DocumentBuilder.clearRunAttrs()? Is there any ways to clear the formatting of previous paragraph, so that output sequence paragraphs will not inherit the previous paragraph formatting?

Thank you.

Hi
Thanks for your request. I think you can try using clearFormatting method:
https://reference.aspose.com/words/java/com.aspose.words/paragraphformat/#clearFormatting
Please see the following code:

builder.getParagraphFormat().clearFormatting();

Hope this helps.
Best regards,