Free Support Forum - aspose.com

setBold(false) deactivates the bold setting in all following styles

I’m using a document template with different styles.

I want to write a text bold.

builder.setBold(true);
builder.writeln(“My Text”);
builder.setBold(false);

After that a table follows which use a style. This style is set to bold text. The Problem:
“My Text” is written in bold but the table not.
Is this setting a global setting which deactivates/overwrites all style settings?


This message was posted using Page2Forum from com.aspose.words (Aspose Words for Java) - Aspose.Words for Java

Hi

Thanks for your request. I think, in your case you should use pushFont and popFont methods. Please follow the link for more information:

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

Hope this helps.

Best regards,