Hi, FYI, support for the Word/XWPF-Format is still rough/unfinished and there is currently no-one who is actively working on it.
It sounds like Word uses some default in this case and Apache POI does not apply this. You can try to look at how the data is stored by simply "unzipping" the .docx file (they are zip-files with XML files inside) and check there if this is how Microsoft Word stores this. Maybe that shows a way to handle this or how to properly read such data. Regards... Dominik. On Sun, Jun 9, 2024 at 8:03 AM Endre Nagy <[email protected]> wrote: > Greetings > > I iterate through each XWPFRun for each XWPFParagraph of an XWPFDocument. > > There is, intermittently, a run that returns > getFontSize() = -1; > getFontSizeAsDouble() = null; > getComplexScriptFontSizeAsDouble() = null; > > Nevertheless getText(0) ,getFontName(), isBold() ... each return what I can > see in the document through a docx user client. I can see the fragment in > the client with FontSize = 12 > > Im Using POI 5.2.5 , though I upgraded because an earlier version also had > this issue. > > Glad to provide further details, but is there any circumstance where this > is the expected result? > > Grevillea >
