XSL-FO table problem

K

Kleist

Hi!

The XML document is created dynamically. I need to convert
it in PDF format. Actually, this is a huge table with data.
I don`t know in advance, how much columns it will have. I
apply XSL-FO style-sheet. And use table-layout=auto property
of the table. But the problem is that is seems to me that
table is created with the same column width taken to fill
the table like ( column-width = table-width / col.number).
And contents of some cells overflow cell borders.
keep-together.within-column doesn`t help. So my question is,
how I need to prepare my style-sheet to handle automatic
column width like it is in HTML. The table width is set on
100%. I don`t know a'priori how much columns will be. And
how to configure hyphenation. The language is German and
with short words hyphenation does well but with long names
and long e-mail addresses it has a really big problem. Hence
a lot of cells are overflowed.
Transformation is performed by FOP. I've googled a lot
and noticed that FOP doesn`t support table-layout=auto. But
in my case there were no errors in the log.

Any help will be appreciated.
 
P

pmgriffin

Hi Kliest,

i too have the exact same problem. First off it is purely as a result
of FOP (and in my case Chive Apoc) not supporting "table-layout=auto".
This problem you are having is quite common and is address on a lot of
forums. The usual approach is to insert zero-width spaces or
non-breaking spaces (​) in long strings of data. The processor
should break the string when a cell boundary is approached and
otherwise ignore the zero-width spaces. I have however found that with
Apoc the space is actually rendered!

For further info on using zero-width spaces for this problem see the
following :
http://www.biglist.com/lists/xsl-list/archives/200201/msg00928.html

Hope this helps in some way!

Regards,
Paul.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top