Hi Jaron,

I discovered this problem and found a fix for it just before 0.20.2RC
was released. So it's in CVS, in the "maintenance" branch, CVS tag
"fop-0_20_2-maintain". You could get the 0.20.2RC source distribution
(same place you downloaded the binary), apply the attached patch to
src/org/apache/fop/fo/flow/TableCell.java and rebuild. 
Or you could get the source file out of CVS, using the web interface:
http://cvs.apache.org/viewcvs.cgi/xml-fop/src/org/apache/fop/fo/flow/TableCell.java?only_with_tag=fop-0_20_2-maintain

Or you could try just sticking the attached class file on your path
before the fop.jar in the binary build. Maybe that will work.

Good luck,
Karen Lease


"Jaron J. Rubenstein" wrote:
> 
> FOPers,
> 
> I have been working through an odd XSL-FO for the past few days. I would
> truly appreciate some assistance in getting this to work (or at least
> confirming that it's a bug). I'm using FOP 0.20.2RC from the binary Linux
> distribution.
> 
> I have a simple table that sets the formatting for my document. The table
> looks like:
> 
>      +---+-+-------+       Legend:
>      | A |B|   C   |       A: empty cell
>      +---+-+-------+       B: empty cell (for spacing)
>      | D |E|   F   |       C: headline (text)
>      |   | |       |       D: image (fo:external-image)
>      |   | |       |       E: empty cell (for spacing)
>      +---+-+-------+       F: lots of text (spans multiple pages)
> 
> The table spans multiple pages because cell F contains a lot of text. The
> image in cell C is a basic fo:external-image wrapped in an fo:block. The
> full xsl:fo code for this (in simplified form) is at the end of this
> e-mail.
> 
> Now, for some reason unbeknownst to me, the image in cell D repeats itself
> in the same column on the second and subsequent pages. That is, the image
> is displayed at the top of cell D on page 1, but it is also displayed at
> the top of that 'column' on pages 2, 3, etc. This happens with any images
> (and multiple images) that are in that cell, but not text. I tried a
> number of solutions, some worked but had nasty side-effects (see the
> comments in the code below).
> 
> My questions:
> 
> 1. Is this supposed to be happening, or this a bug in the FOPlayout
> engine?
> 
> 2. How can I fix this?
> 
> I'm hoping that somebody can shed some light on this for me. I've searched
> books, the archives, and the Web, and can't seem to find any answers. I've
> tried numerous solutions, none of which seem to work. At this point, I'm
> either going to start pouring through Java FOP code, or give up. Any
> pointers in the right direction are very much appreciated!
> 
> Thanks in advance,
> 
>                                 -Jaron
> 
> --
> Jaron Rubenstein, Logicept
> [EMAIL PROTECTED]
> www.logicept.com
> 


> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, email: [EMAIL PROTECTED]
*** TableCell.java.0_20_2RC     Sat Sep 29 21:28:30 2001
--- TableCell.java      Wed Nov 21 00:14:53 2001
***************
*** 82,87 ****
--- 82,92 ----
  
      // boolean setup = false;
      boolean bSepBorders = true;
+     
+     /**
+      * Set to true if all content completely laid out.
+      */
+     boolean bDone=false;
  
      /**
       * Border separation value in the block-progression dimension.
***************
*** 209,214 ****
--- 214,220 ----
              area.getIDReferences().createID(id);
  
              this.marker = 0;
+           this.bDone=false;
          }
  
          /*
***************
*** 250,256 ****
          cellArea.setTableCellXOffset(startOffset);
  
          int numChildren = this.children.size();
!         for (int i = this.marker; i < numChildren; i++) {
              FObj fo = (FObj)children.elementAt(i);
              fo.setIsInTableCell();
              fo.forceWidth(width);    // ???
--- 256,262 ----
          cellArea.setTableCellXOffset(startOffset);
  
          int numChildren = this.children.size();
!         for (int i = this.marker; bDone==false && i < numChildren; i++) {
              FObj fo = (FObj)children.elementAt(i);
              fo.setIsInTableCell();
              fo.forceWidth(width);    // ???
***************
*** 275,280 ****
--- 281,287 ----
              area.setMaxHeight(area.getMaxHeight() - spaceLeft
                                + this.cellArea.getMaxHeight());
          }
+       this.bDone=true;
          cellArea.end();
          area.addChild(cellArea);
  

Attachment: TableCell.class
Description: Binary data

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

Reply via email to