srjit
srjit

Reputation: 526

Default document font size of doc/docx documents

I am trying to find the default font size of a doc/ docx document using apache poi. I have used the XWPFRun class method getFontSize(). But it returns the value -1 if the font size is default. I couldn't find any other method that returns the same in the documentation. Is there a way i can get the "actal" default font size of the document?

Upvotes: 2

Views: 1710

Answers (1)

user1419243
user1419243

Reputation: 1705

In my case,

document.getStyles().getDefaultRunStyles().getFontSize();

solved the problem.

Upvotes: 1

Related Questions