On Wed, 2004-05-26 at 10:08, James Earl wrote:
> On Tue, 2004-05-25 at 18:14, Andreas L. Delmelle wrote:
>  
> > Say you have a max record width (sum of all respective max field widths) of
> > 65, then each column gets its width according to a calculation like
> > 
> > [( proportional-width / 65 ) * remaining-table-width ]
> 
> I'll post any success that I have!

I'm not sure if I'm doing this right... but the following gave
acceptable results:

Columns (max field length):

1. 20
2. 10
3. 5
4. 1
5. 11
6. 6

Total: 53

Calculations:

1. (20 / 53) * 33 = 12.5 (e.g. proportional-column-width(12.5))
2. (10 / 53) * 43 = 8.1
3. (5 / 53) * 48 = 4.5
4. (1 / 53) * 52 = 0.9
5. (11 / 53) * 42 = 8.7
6. (6 / 53) * 47 = 5.3

I've just tried this once so far, but it worked great.  I have two
templates set up.  Once exports xsl-fo, while the other one exports
html.  The PDF generated by FOP looks almost identical in terms of the
column widths.

I just need to take into account the max length of the column heading
when it is larger than the column data.

James



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to