As it stands now, I have about 12 columns and all of them are exactly the same width. The problem is that some columns don't require that much space. How do I get the columns to fit their content? The columns need to be a dynamic width.
I've tried
<fo:table table-layout="auto">
And
<fo:table-column column-width="proportional-column-width(1)" column-number="1"/>
<fo:table-column column-width="proportional-column-width(1)" column-number="2"/>
<fo:table-column column-width="proportional-column-width(1)" column-number="3"/>
Nothing seems to do the trick.
Unfortunately I didn't find a simple way to have dynamic column widths. I ended up with this:
<fo:table-column column-number="1" column-width="35pt" />
<fo:table-column column-number="2" />
<fo:table-column column-number="3" />
<fo:table-column column-number="4" />
<fo:table-column column-number="5" />
<fo:table-column column-number="6" />
<fo:table-column column-number="7" />
<fo:table-column column-number="8" />
<fo:table-column column-number="9" />
<fo:table-column column-number="10" />
<fo:table-column column-number="11" />
<fo:table-column column-number="12" />
I specify the first column because the data will never change. The rest I leave open to fit their content. Works the way I need it to work for now.
You can also specify the units in "percent units". Works fine for me...
<fo:table-column column-number="1" column-width="75%" />
<fo:table-column column-number="2" column-width="25%" />
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With