Page 1 of 1

setupTrPr not implemented

PostPosted: Tue Sep 09, 2014 8:55 pm
by roded
Hi,
I'm converting HTML which contains 3rd-party-generated (Jasper actually) tables to docx.
To implement vertical spacing, the 3rd-party library uses either table rows whose cells have a height defined (while the row itself has not defined height) as well as rows with a height defined explicitly.
I would like the XHTML processing to support both height defined Trs as well as Trs whose height is derived by their Tcs' height.

I noticed XHTMLImporterImpl's setupTrPr() is not yet implemented in 3.2.0, is there a reason why this is so?
I wouldn't mind implementing this myself, though as I'm a novice in this regard, some discussion is in order.

Thanks,
Roded

Re: setupTrPr not implemented

PostPosted: Tue Sep 09, 2014 10:06 pm
by jason
roded wrote:I noticed XHTMLImporterImpl's setupTrPr() is not yet implemented in 3.2.0, is there a reason why this is so?


Yeah, I noticed that today as well. No reason, other than priorities.

Implementing http://webapp.docx4java.org/OnlineDemo/ ... eight.html ought to be straightforward.

Calculating a trHeight based on tc height will be complicated. Unless there is a compelling reason to do so, I'd omit the trHeight so "the table row shall automatically resize its height to the height required by its contents (the equivalent of an hRule value of auto)."

Please note that today, I moved the table stuff into a separate class,

https://github.com/plutext/docx4j-Impor ... 1f78a544fb

so please be sure you've pulled the latest commits before working on the source code.

Re: setupTrPr not implemented

PostPosted: Tue Sep 09, 2014 11:56 pm
by roded