We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Font size in table cell read incorrectly

Hi,


In the attached Word document, font size in table cells is 11. When I get the font size with the code, I get 12.0. Can you help me with this?

Here’s the code I used:

Document document = new Document(
“10.04.15_projektansuchen_neu_web.docx”);

final List runs = new ArrayList();

try {
document.accept(new DocumentVisitor() {
@Override
public int visitRun(Run run) throws Exception {
runs.add(run);

return super.visitRun(run);
}
});
} catch (Exception e) {
throw new RuntimeException(e);
}

System.out.println("Text: " + runs.get(2).getText());
System.out.println("Font size: " + runs.get(2).getFont().getSize());

I’m using Aspose.Words 14.3.0.

Thanks,
Zeljko

Hi Zeljko,

Thanks for your inquiry. The font size of text inside table’s cells is 12 in input document. Please check the attached image for detail. Please make sure that you have attached the correct document.