Hi,
I have Word document with table, and as You can see first cell text is bolded. When I use following code:
import org.junit.Test;
import com.aspose.words.Document;
import com.aspose.words.DocumentVisitor;
import com.aspose.words.Run;
public class TestBold {
class DocVisit extends DocumentVisitor {
public int visitRun(Run run) throws Exception {
if (run.getText().startsWith(“Name of Award”)) {
System.out.println("BOLD: " + run.getFont().getBold());
}
return super.visitRun(run);
}
}
public void test() throws Exception {
Document doc = new Document(
“bold-test.docx”);
doc.accept(new DocVisit());
}
}
I am getting following output:
BOLD: false
Word file is attached to this post too. Can You help me here? Note that I am using Aspose.Words for Java 14.3.0
Best regards,
Zeljko