You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@lenya.apache.org by Wolfgang Kaltz <jw...@yahoo.com> on 2004/07/06 19:15:34 UTC

info on pdf generation and tables

Hi list,
I'm trying out the PDF generation feature, as previously described in the 
mailing list, and found out a couple of things that I thought I'd share.
First, as described by Christian Kreutz in
  http://nagoya.apache.org/eyebrowse/ReadMsg?
listName=lenya-user@cocoon.apache.org&msgId=1374230
it is simple to activate and is basically working.

But, as noticed by Manuel Siebeneicher (see
  http://nagoya.apache.org/eyebrowse/ReadMsg?
listName=lenya-user@cocoon.apache.org&msgNo=1940
)
tables don't work with the suggested stylesheet.

I found that this is because the PDF generator included in Lenya, Apache's FOP
is incomplete regarding tables: see
http://xml.apache.org/fop/compliance.html#fo-object-table 
http://xml.apache.org/fop/faq.html#table-missing
If tables are not as FOP expects them, it ignores them completely :(

As a work-around, you can do the following: uncomment the table caption stuff,
and provide an column-width for each column in your table:
Example:
<xsl:template match="html:table">
      <!-- <fo:table-and-caption xsl:use-attribute-sets="table-and-caption">
                  <xsl:call-template name="make-table-caption"/> -->
      <fo:table xsl:use-attribute-sets="table">
              <fo:table-column column-width="8cm"/>
              <fo:table-column column-width="8cm"/>
        <xsl:call-template name="process-table"/>
      </fo:table>
      <!-- </fo:table-and-caption> -->
  </xsl:template>

Of course, this is not completely satisfactory, because you need to know
how many columns you have. 
But maybe this is useful as a temporary work-around for some people,
while waiting for the new generation of Apache FOP.

If anybody has a more flexible way of making this work, please share it !
(if so, we could put it in the wiki)



---------------------------------------------------------------------
To unsubscribe, e-mail: lenya-user-unsubscribe@cocoon.apache.org
For additional commands, e-mail: lenya-user-help@cocoon.apache.org