Karen,
Thanks for looking into this. I did try to set the table
width, at "100%" and (after accounting for margins, etc.)
"9.85in" to no avail. My concern was not so much the
warning message as the output PDF.
I did try proportional-column-length(int), but I must have
misunderstood it. I specified the int parameter as the
column number for each column, using the $pos. When
I changed it to use 1 for each column, it worked. And
it's simpler than the solution I had devised (below).
The combination of both suggestions even ended the
log WARN messages.
I still had to put "presentation" information in the
data file at the servlet, but what I had done to get the
columns to fit was:
<xsl:variable name="sum-width">
<xsl:value-of select="sum(/database/report0/report-line[position()
='1']/child::*/@width)" />
</xsl:variable>
<xsl:for-each select="/database/report0/report-line[position()='1']/child::
*" >
<xsl:variable name="pos"><xsl:value-of select="position()"
/></xsl:variable>
<fo:table-column column-width="from-parent('width') * ({@width} div
{$sum-width})" column-number="{$pos}" />
</xsl:for-each>
This worked as I expected, and I fit 10 columns across
a landscape view. It's a lot uglier code than setting
proportional-column-width(1), however.
Thanks again,
Joe
Karen Lease
<klease@club-in To: [EMAIL PROTECTED]
ternet.fr> cc:
Sent by: Subject: Re: column-width as em
karen@club-inte
rnet.fr
01/24/2002
06:24 PM
Please respond
to fop-dev
Hi Joseph,
I think it will work if you set a width on your table. Try width="100%".
The message is a little obscure: it means the number of millipoints
(1/1000ths of points) which is the sum of your column widths is greater
than the specified inline-progression-dimension which isn't set to
anything.
You might also try setting all of the column-widths to one proportional
unit using column-width="proportional-column-width(1)". That should make
sure that all your columns are included, whatever the width is. You must
still set the width on the table though.
Good luck,
Karen Lease
[EMAIL PROTECTED] wrote:
>
> When I use:
>
> <xsl:for-each select="/database/report0/report-line[position()
> ='1']/child::*" >
> <xsl:variable name="pos"><xsl:value-of select="position()"
> /></xsl:variable>
> <fo:table-column column-width="{@width}em" column-number="{$pos}"
> />
> </xsl:for-each>
>
> I get an warning message that
> "Sum of fixed column widths 1512000 greater than maximum specified IPD 0"
>
> 1512000 is 12000 times the sum of my width attributes. The PDF display
> includes
> only the first five of my ten columns, and the columns are much wider
than
> I expect.
>
> I set the width attributes in a servlet reading from a database.
> (resMetaD is ResultSetMetaData from my query.)
>
> width = resMetaD.getColumnDisplaySize(i);
>
> if (resMetaD.getColumnLabel(i) != null) {
> label = resMetaD.getColumnLabel(i);
> } else {
> label = resMetaD.getColumnName(i);
> }
>
> if (width < label.length()) {
> width = label.length();
> }
>
> width=width+3;
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]