Indeed, the problem is your use of table-cells which are not defined by
table-column elements. The current FOP Trunk code doesn't fail anymore
in this constellation and outputs an informative warning. But I still
suggest you define those table-column elements for each column. RTF
could probably improved a little but at least at the moment FOP Trunk
doesn't fail and produces "something". The behaviour may not be the same
as for PDF, however.

On 19.06.2006 10:38:04 Alessio wrote:
> Hi, there's a problem in this example for rtf format :
> 
> <fo:table table-layout="fixed" 
> xmlns:fo="http://www.w3.org/1999/XSL/Format"; 
> xmlns:fox="http://xml.apache.org/fop/extensions";><fo:table-column 
> column-width="100pt"/><fo:table-body>
>          <fo:table-row>
>              <fo:table-cell padding-start="3pt" padding-end="3pt" 
> padding-before="3pt" padding-after="3pt"><fo:block 
> text-align="start">test 1</fo:block></fo:table-cell>
>              <fo:table-cell padding-start="3pt" padding-end="3pt" 
> padding-before="3pt" padding-after="3pt"><fo:block 
> text-align="start">test 2</fo:block></fo:table-cell>
>              <fo:table-cell padding-start="3pt" padding-end="3pt" 
> padding-before="3pt" padding-after="3pt"><fo:block 
> text-align="start"> </fo:block></fo:table-cell>
>          </fo:table-row>
>      </fo:table-body></fo:table>
> 
> this is the stack trace :
> java.lang.RuntimeException: Index: 1, Size: 1
>       at org.apache.fop.render.rtf.RTFHandler.startCell(RTFHandler.java:878)
>       at 
> org.apache.fop.render.rtf.RTFHandler.invokeDeferredEvent(RTFHandler.java:1545)
>       at 
> org.apache.fop.render.rtf.RTFHandler.recurseFONode(RTFHandler.java:1560)
>       at 
> org.apache.fop.render.rtf.RTFHandler.recurseFONode(RTFHandler.java:1625)
>       at 
> org.apache.fop.render.rtf.RTFHandler.recurseFONode(RTFHandler.java:1625)
>       at 
> org.apache.fop.render.rtf.RTFHandler.recurseFONode(RTFHandler.java:1604)
>       at 
> org.apache.fop.render.rtf.RTFHandler.recurseFONode(RTFHandler.java:1625)
>       at 
> org.apache.fop.render.rtf.RTFHandler.recurseFONode(RTFHandler.java:1625)
>       at 
> org.apache.fop.render.rtf.RTFHandler.recurseFONode(RTFHandler.java:1583)
>       at 
> org.apache.fop.render.rtf.RTFHandler.endPageSequence(RTFHandler.java:233)
>       at 
> org.apache.fop.fo.pagination.PageSequence.endOfNode(PageSequence.java:147)
>       at 
> org.apache.fop.fo.FOTreeBuilder$MainFOHandler.endElement(FOTreeBuilder.java:357)
>       at org.apache.fop.fo.FOTreeBuilder.endElement(FOTreeBuilder.java:193)
>       at 
> org.apache.xalan.transformer.TransformerIdentityImpl.endElement(TransformerIdentityImpl.java:1101)
>       at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown 
> Source)
>       at 
> org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown Source)
>       at 
> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown
>  
> Source)
>       at 
> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown 
> Source)
>       at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
>       at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
>       at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
>       at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
>       at 
> org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:484)
> 
> Ok, the fo code is not correct , there is 1 fo:table-column and 2 
> fo:table-cell , but for pdf format there isn't some problem, so it's 
> a pdf  or rtf format bug ? :D
> Thank's Alessio



Jeremias Maerki

Reply via email to