Hi,
can you chek this problem please…
methods Font.getColor(), Font.getUnderline() and Font.getStrikeTrough() returns wrong values, in attached Word Document “run” have a color, underline and strikeTrough but methods returns:
“java.awt.Color[r=0,g=0,b=0] 0 false”, respectively.
You can chek this problem whit this example:
public class FontTest {
@Test
public void fontTest() throws Exception {
String path = "d:/";
Document document = new Document(path + "Biomarker.docx");
NodeList runs = document.selectNodes("//Run");
Run run = (Run) runs.get(28);
Font font = run.getFont();
System.out.println(run.getText());
System.out.println(font.getColor());
System.out.println(font.getUnderline());
System.out.println(font.getStrikeThrough());
}
}
Thanks,
Bojan