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 "Mazza, Glen R, PERSCOM" <Gl...@hoffman.army.mil> on 2002/08/22 00:06:20 UTC

setting the spacing between columns.

Hello,

I'm trying to duplicate a fixed-width font report, but I'm getting an
erratic amount of spacing between columns for a table I'm creating.  

Trying to have a table header like this:

co1 c2 colu3 column4
--- -- ----- -------

I'm using a nine-point font, so I'm requested "9pt. * {col width}" for each
column-width:

<fo:block font-size="9pt" font-family="monospace" line-height="12pt"
white-space-collapse="false">
<fo:table table-layout="fixed" width="9in">
	<fo:table-column column-width="9pt * 3"/>
	<fo:table-column column-width="9pt * 2"/>
	<fo:table-column column-width="9pt * 5"/>
	<fo:table-column column-width="9pt * 7"/>

I'm getting something like this for my layout:

co1   c2  colu3      column4
---   --  -----      -------

I'm making either of two mistakes I think:  
(1.)  If I choose a nine-pt. font I'm assuming that 3 chars will take up
27pts.  (Or is this a correct assumption?)

(2.)  I'm not setting the property specifying the spacing between columns.
(What property should I be setting to specify a one-character (9pt.) width
between columns?)

Thanks,
Glen

Re: setting the spacing between columns.

Posted by "J.Pietschmann" <j3...@yahoo.de>.
Mazza, Glen R, PERSCOM wrote:
> I'm trying to duplicate a fixed-width font report, but I'm getting an
> erratic amount of spacing between columns for a table I'm creating.  
...
> <fo:block font-size="9pt" font-family="monospace" line-height="12pt"
> white-space-collapse="false">
> <fo:table table-layout="fixed" width="9in">

I'm not sure but you could try to remove the width from the
fo:table, as the width of the table is already determined
by the sum of the widths of the columns.

> (1.)  If I choose a nine-pt. font I'm assuming that 3 chars will take up
> 27pts.  (Or is this a correct assumption?)
9pt is the *height* of a standard upper case letter of the
font. If this corresponds to the width of the characters is
up to the font.

> (2.)  I'm not setting the property specifying the spacing between columns.
> (What property should I be setting to specify a one-character (9pt.) width
> between columns?)
border-separation, I think. It may be possible that this is
not implemented in 0.20.4, but it will in the next maintenance
release (if there is one).

J.Pietschmann