You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-dev@xmlgraphics.apache.org by "Sander, Stefan" <ss...@microstrategy.com> on 2001/03/20 11:17:41 UTC

Table column widhts

Hi there,

since there are many people out there writing tables in their PDFs, 
has anyone come up with a good algorithm to determine the column widths
based on content?

Can anyone point me to the right direction or offer some hints?


Thanks in advance,

Stefan


Re: Table column widhts

Posted by FAGOT Alain <Al...@framfab.nl>.
Alex McLintock wrote:
  > Your problem is that deciding on column widths is a visual thing to
 > be done  by a designer with a pair of eyes. Unless you have a well
 > known set of table data   (such as integers) and a well understood
 > way of determinining size  (eg number of digits) then you really
 > don't have an alternative.

	You could also use an approach featured in (La)TeX or HTML.  The width is 
  determined by formatting the cell data without breaking lines.  This 
would  work only for  small cell elements.

	Not that much of a help, I fear...

			Alain.
--
FAGOT Alain
Alain.FAGOT@framfab.nl     Senior Java Developer
Tel: +31 20  586 99 36     NetlinQ Framfab
Fax: +31 20  682 75 56     Arlandaweg 92
http://www.framfab.nl/  NL-1043 EX  Amsterdam


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
For additional commands, email: fop-dev-help@xml.apache.org


Re: Table column widhts

Posted by Alex McLintock <al...@yahoo.com>.
--- "Sander, Stefan" <ss...@microstrategy.com> wrote: > Hi there,
> 
> since there are many people out there writing tables in their PDFs, 
> has anyone come up with a good algorithm to determine the column widths
> based on content?

My algorithm...

  Divide the width available by the number of columns and assign that as 
  width for each column. 

  Produce a pdf from it.

LABEL:

  See which columns look bad and need to be widened or made thinner.
  Consider whether to align right, left or center each column. (my numbers are 
  usually right aligned)

  Produce a pdf from it.

  if not satisfactory then go to LABEL.

 
> Can anyone point me to the right direction or offer some hints?

Your problem is that deciding on column widths is a visual thing to be done
by a designer with a pair of eyes. Unless you have a well known set of table data 
(such as integers) and a well understood way of determinining size
(eg number of digits) then you really don't have an alternative.

Sorry.

Alex

http://www.OWAL.co.uk/asf/fop.jsp FOP FAQ
please email me with new questions and answers because I am useless and have broken 
the registration mechanism.



=====
Alex McLintock        alex@OWAL.co.uk

OpenWeb Analysts Ltd, http://www.OWAL.co.uk/
Software for Complex Websites.

Publisher of       http://www.DiverseBooks.com
                   http://www.galactic-guide.com/

__________________________________________________
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail. 
http://personal.mail.yahoo.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
For additional commands, email: fop-dev-help@xml.apache.org