Re: [xsl] XSL-FO column width

Subject: Re: [xsl] XSL-FO column width
From: "Jay Bryant" <jay@xxxxxxxxxxxx>
Date: Tue, 5 Feb 2008 18:29:00 -0600
Hi, Alex,

Make sure that you have enough columns (and space within the columns) to fill the area available to the table. Suppose you have 8.5in wide paper and 1in margins on both sides. In that case (assuming no other objects are in that space), the table has 6.5in it can use. So, to fill the space and get two columns exactly 2in and 3in wide, you'd create three columns of 2in, 3in, and 1.5in. Then you'd set the borders and background colors of the cells in the third column to white (or whatever your paper color might be).

I can't guarantee this trick will fix your problem, but it fixed a similar problem for me about 15 months ago.

HTH

Jay Bryant
Bryant Communication Services
http://www.bryantcs.com/

----- Original Message ----- From: <abarros1@xxxxxxx>
To: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx>
Sent: Tuesday, February 05, 2008 5:29 PM
Subject: [xsl] XSL-FO column width



I am trying to create a table with 2 columns and EXACT sizes, like:


<fo:table table-layout="fixed">
<fo:table-column column-width="2in" background-color="yellow"/>
<fo:table-column column-width="3in" background-color="green"/>
<fo:table-body>
<fo:table-row>
<fo:table-cell display-align="before"><fo:block>Cell 1.</fo:block></fo:table-cell>
<fo:table-cell display-align="after"><fo:block>Cell 2</fo:block></fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>


The file is processed ok by Fop and another xsl-fo processor that I tried here, but when I print the PDF and measure the columns, I never get the 2in and 3in that I want, no matter what I do. I tried changing printers, page size, etcb& and always get something like 2.4in and 3.5in. Can anyone help me with that?

Thanks,

Alex

Current Thread