Hi,
I would like to set a fixed TableRow height but have no clue, how the value itself is calculated the right way?
Which "formular" is to apply to get the correct value, based on px I want to multiplicate with what factor?
private static void addTableRowHeightSetting(Tr tr, int pxFont) {
int scale = 300; // -> what is the factor here
BigInteger rowHeight = BigInteger.valueOf(pxFont * scale);
TrPr trPr = new TrPr();
CTHeight ctHeight = new CTHeight();
ctHeight.setHRule(STHeightRule.EXACT);
ctHeight.setVal(rowHeight);
JAXBElement<CTHeight> jaxbElement = wmlObjectFactory.createCTTrPrBaseTrHeight(ctHeight);
trPr.getCnfStyleOrDivIdOrGridBefore().add(jaxbElement);
tr.setTrPr(trPr);
}
Kind regards,
Andreas