Get current height of xwpf row, cell, paragraph

281 Views Asked by At

I am using XWPF to read .docx file which contain a table. In this table I get row then cell then I add a paragraph inside and in this paragraph I add multiple Run (with different style of font)

My question is (I know I don’t have posibility to get when word add new page or it is out of scope to me...?) But what I want achieve is get current height in my loop of the tableRow or tableCell is this possible? I mean something like this squelette code

XWPFTableRow r = ...;
For(...){
  r.getCell(0).addNewParagraph(0).newRun().setText(...);

  // at this step of programm I want height of each cell and each paragraph, 
  // is this possible? Because each iteration my table row height increment..
}

I tried tableRow.getHeight() to get row height but it get always 0, someone have idea to get row or cell or paragraph height?

0

There are 0 best solutions below