Page 1 of 1
how to change table height in docx4j

Posted:
Tue Feb 11, 2014 11:19 pm
by rrr
please tell me how to change table height in docx4j
thanks in advace..
Re: how to change table height in docx4j

Posted:
Wed Feb 12, 2014 7:22 am
by jason
If you look at my previous replies to your questions, you'll see they explain to you how to work this out for yourself.
So I'll leave you to do that. If you have problems after trying, feel free to post again.
Re: how to change table height in docx4j

Posted:
Wed Feb 12, 2014 10:55 pm
by rrr
I got following code for the table height
- Code: Select all
factory = Context.getWmlObjectFactory();
table = factory.createTbl();
TrPr trPr = new TrPr();
CTHeight ctHeight = new CTHeight();
ctHeight.setHRule(STHeightRule.EXACT);
JAXBElement<CTHeight> jaxbElement = factory.createCTTrPrBaseTrHeight(ctHeight);
trPr.getCnfStyleOrDivIdOrGridBefore().add(jaxbElement);
Is this code work for table height ?
please provide solution..
Re: how to change table height in docx4j

Posted:
Thu Feb 13, 2014 6:14 am
by jason
Well, does it work?
Obviously you need to integrate it into your own code. Assuming Tr tr, you'd have to do something like tr.setTrPr(trPr)