You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by Egor Malyshev <eg...@gmail.com> on 2009/04/07 17:36:44 UTC
Table Width Problem -- Expands Beyond the Page, Column Widths Are
Ignored
Somebody please help me. I am stuck with this problem -- FOP 0.95 renders
table that expands beyond the rightmost edge of the page. And, to make life
even more miserable, it completely ignores the column widths I am
specifying.
Here's the xsl:fo code I am using:
<fo:table table-layout="fixed" border-collapse="collapse">
<fo:table-column column-width="120mm" column-number="1"/>
<fo:table-column column-width="120mm" column-number="2"/>
<fo:table-header>
<fo:table-row background-color="silver" margin-bottom="2pt">
<fo:table-cell padding="5pt">
<fo:block-container overflow="hidden" width="120">
<fo:block-container>
<fo:block font-weight="bold" color="white">Icon</fo:block>
</fo:block-container>
</fo:block-container>
</fo:table-cell>
<fo:table-cell padding="5pt">
<fo:block-container overflow="hidden" width="120">
<fo:block-container >
<fo:block font-weight="bold" color="white">Description</fo:block>
</fo:block-container>
</fo:block-container>
</fo:table-cell>
</fo:table-row>
</fo:table-header>
<fo:table-body>
<fo:table-row background-color="white">
<fo:table-cell padding="5pt">
<fo:block-container overflow="hidden" width="120">
<fo:block-container>
<fo:block>
<fo:external-graphic
src="images/uiStatusBackground.png"/>
</fo:block>
</fo:block-container>
</fo:block-container>
</fo:table-cell>
<fo:table-cell padding="5pt">
<fo:block-container overflow="hidden" width="120">
<fo:block-container >
<fo:block>Click this icon to invoke the Background Tasks
manager.</fo:block>
</fo:block-container>
</fo:block-container>
</fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>
And here's the sample that it produces:
http://www.nabble.com/file/p22931862/renderSample.png
Any suggestions are very very very highly appreciated, because I've spent
sooooo many time digging w3c specs, and googling trying to figure out what's
wrong with it, that I feel like it's what I've been doing this all my life
to this exact moment.
--
View this message in context: http://www.nabble.com/Table-Width-Problem----Expands-Beyond-the-Page%2C-Column-Widths-Are-Ignored-tp22931862p22931862.html
Sent from the FOP - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: Table Width Problem -- Expands Beyond the Page, Column Widths
Are Ignored
Posted by Egor Malyshev <eg...@gmail.com>.
Yes, I have enough room on paper, it should fit on a portrait A4, there's
about 260mm of space.
I was wondering why the column widths are wrong -- thanks a lot for pointing
out I was missing the unit qualifier.
Andreas Delmelle-2 wrote:
>
> On 07 Apr 2009, at 17:36, Egor Malyshev wrote:
>
> Hi
>
>> Somebody please help me. I am stuck with this problem -- FOP 0.95
>> renders
>> table that expands beyond the rightmost edge of the page. And, to
>> make life
>> even more miserable, it completely ignores the column widths I am
>> specifying.
>
> <snip />
>
>> <fo:table table-layout="fixed" border-collapse="collapse">
>> <fo:table-column column-width="120mm" column-number="1"/>
>> <fo:table-column column-width="120mm" column-number="2"/>
>
> The columns are 12cm each here. Two columns equals 24cm. Do you have
> enough room available on the page? Do you perhaps expect the table to
> be broken in inline-progression-direction? If so, that is not yet
> implemented in FOP at the moment.
>
> Note also:
>
>> <fo:table-cell padding="5pt">
>> <fo:block-container overflow="hidden" width="120">
>> <fo:block-container>
>> <fo:block font-weight="bold" color="white">Icon</fo:block>
>> </fo:block-container>
>> </fo:block-container>
>
> The block-container will be only 120 *pixels* wide. Since you don't
> specify a unit, FOP will assume you mean 'px', which in case of PDF
> output means 'pt', or 1/72in.
> At any rate, in most cases this will be much less than 120mm...
>
>
> HTH!
>
> Andreas
>
> ---------------------------------------------------------------------
> 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/Table-Width-Problem----Expands-Beyond-the-Page%2C-Column-Widths-Are-Ignored-tp22931862p22933536.html
Sent from the FOP - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: Table Width Problem -- Expands Beyond the Page, Column Widths Are Ignored
Posted by Andreas Delmelle <an...@telenet.be>.
On 07 Apr 2009, at 17:36, Egor Malyshev wrote:
Hi
> Somebody please help me. I am stuck with this problem -- FOP 0.95
> renders
> table that expands beyond the rightmost edge of the page. And, to
> make life
> even more miserable, it completely ignores the column widths I am
> specifying.
<snip />
> <fo:table table-layout="fixed" border-collapse="collapse">
> <fo:table-column column-width="120mm" column-number="1"/>
> <fo:table-column column-width="120mm" column-number="2"/>
The columns are 12cm each here. Two columns equals 24cm. Do you have
enough room available on the page? Do you perhaps expect the table to
be broken in inline-progression-direction? If so, that is not yet
implemented in FOP at the moment.
Note also:
> <fo:table-cell padding="5pt">
> <fo:block-container overflow="hidden" width="120">
> <fo:block-container>
> <fo:block font-weight="bold" color="white">Icon</fo:block>
> </fo:block-container>
> </fo:block-container>
The block-container will be only 120 *pixels* wide. Since you don't
specify a unit, FOP will assume you mean 'px', which in case of PDF
output means 'pt', or 1/72in.
At any rate, in most cases this will be much less than 120mm...
HTH!
Andreas
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org