xmlgraphics-fop-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeremias Maerki <...@jeremias-maerki.ch>
Subject Re: fop dynamic table column-width
Date Wed, 09 Jul 2008 14:11:19 GMT
On 09.07.2008 15:12:15 George Tsopouridis wrote:
> 
> Thank you Jeremias, I appreciate your answer
> 
> but i think (as i can see) that i am taking the same result if instead of 
> 
> <fo:table table-layout="fixed">
> <fo:table-column column-width="proportional-column-width(10)"/>
> <fo:table-column column-width="proportional-column-width(80)"/>
> <fo:table-column column-width="proportional-column-width(10)"/>
> 
> i use 
> 
> <fo:table table-layout="fixed">
> <fo:table-column column-width="10%"/>
> <fo:table-column column-width="80%"/>
> <fo:table-column column-width="10%"/>

Of course, that's fine, too.

> I want to describe you my scenario, and i cannot understand why.... If i
> have 3 cells in each column and if i put in my first cell (10%) an image
> which width is greater than 10%*width, i lose percentage of my image in the
> left side (why ;)

Because the cell width is fixed due to the fo:table-column element and
a table-cell creates a reference area that allows overflow processing 
(clipping). Or the next cell could simply over paint overflown content
from the previous one. If you have no cell background, the overflown
content should still appear. Only overflow="hidden" will initiate
clipping.

> Also, if i put in my third cell (10%) an image which width is greater than
> 10%*width, i lose percentage of my image in the right side (why ;)

See above.

> What i can do; I would like not to lose my icons...and futhermore i cannot
> know before my image's width...

You can scale down the images:

<fo:external-graphic src="..."
inline-progression-dimension.maximum="100%"
content-width="scale-down-to-fit"/>
should do the job (only works in 0.95beta or later).

Obviously, you can also increase the column widths. But if scaling down
the images is not an option, you're running out of options, even if
auto-table layout was supported, since an image could still be larger
than a column can be extended in inline-progression-dimension.

> Thanks again for your interesting...
> 
> 
> 
> Jeremias Maerki-2 wrote:
> > 
> > FOP doesn't support automatic table layout (i.e. automatic selection of
> > best column widths based on content), yet. However, you can use the
> > proportional-column-width(N) function in the column-width property on
> > fo:table-column to specify the relative width of the columns. The
> > effective columns widths are then determined based on the table width.
> > 
> > On 09.07.2008 10:56:10 George Tsopouridis wrote:
> >> 
> >> Hello,
> >> 
> >> Is there a clear way to have dynamic table column-width in fop. I must
> >> tell
> >> that i produce my fo with xslt...
> >> What fop supports;; I am using fop 0.94
> >> 
> >> Thanks in advance...
> >> -- 
> >> View this message in context:
> >> http://www.nabble.com/fop-dynamic-table-column-width-tp18357126p18357126.html
> >> Sent from the FOP - Users mailing list archive at Nabble.com.
> >> 
> > 
> > 
> > Jeremias Maerki
> > 
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> > For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
> > 
> > 
> > 
> 
> -- 
> View this message in context: http://www.nabble.com/fop-dynamic-table-column-width-tp18357126p18361300.html
> Sent from the FOP - Users mailing list archive at Nabble.com.



Jeremias Maerki


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Mime
View raw message