Free Support Forum - aspose.com

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:

http://www.aspose.com/documentation/java-components/aspose.words-for-java/com/aspose/words/paragraphformat.html#clearFormatting()

Please see the following code:

builder.getParagraphFormat().clearFormatting();

Hope this helps.

Best regards,