You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by Harshini Madurapperuma <ha...@ifs.lk> on 2008/10/23 05:33:02 UTC

Missing table footer when report data exactly fits into a single page and "Leave out table footer at page-break" is enabled

Hi All;

When a table row has set a row-height and when data is exactly fit into a single page and "omit-tableFooter at page break" is enabled, the table footer doesn't print in the next page alone. The table footer gets disappeared.

Is this a known problem in FOP? I'm having fop version 0.20.5, abit old version and can't go for a higher version at this moment.


 int status = tableFooter.layout(areaContainer);
 if (Status.isIncomplete(status)) {
                /* this is a problem since we need to remove a row
                from the last table body and place it on the
                next page so that it can have a footer at
                the end of the table.*/

               if (this.omitHeaderAtBreak) {
                       /* remove header, no longer needed */
                      tableHeader = null;
                  }
                log.warn("footer could not fit on page, moving last body row to next page");
                area.addChild(areaContainer);
                area.increaseHeight(areaContainer.getHeight());
                tableFooter.removeLayout(areaContainer);
                tableFooter.resetMarker();
                return Status.AREA_FULL_SOME;
}

Many Thanks in Advance
Harshini

------------------------------------------------------------------------------

CONFIDENTIALITY AND DISCLAIMER NOTICE

This e-mail, including any attachments, is confidential and intended only for
the addressee. If you are not the intended recipient, please notify us
immediately and delete this e-mail from your system. Any use or disclosure of
the information contained herein is strictly prohibited.


Re: Missing table footer when report data exactly fits into a single page and "Leave out table footer at page-break" is enabled

Posted by Andreas Delmelle <an...@telenet.be>.
On Oct 24, 2008, at 05:24, Harshini Madurapperuma wrote:

> I would be really thankful for the effort you have taken to run  
> this file.

The effort was very small. Try once, run into the empty static- 
content/table-cell issue. Fix that. Try again, run into the 'element- 
id' issue. Fixed that, and it worked.

FWIW, if you're wondering why this took virtually no time at all, I  
fixed both issues with a small, simple stylesheet, with the following  
template:

<xsl:template match="fo:*">
   <xsl:copy>
     <xsl:copy-of select="@*[name()!='element-id']" />
     <xsl:if test="not(*) and (name()='fo:table-cell' or name() 
='fo:static-content')">
       <fo:block />
     </xsl:if>
     <xsl:apply-templates />
   </xsl:copy>
</xsl:template>

> I'm really happy to know that the file gave the expected output. In  
> order to verify, will I be able to know about the outcome. Does it  
> give 3 full page output and a last page(fouth page) only with table  
> header(background color pink) and footer (background color green)?  
> This should be the expected output.

Well, 0.95 also moves the last row to the fourth page. Haven't looked  
into too much details yet, but at least, that's much better than an  
infinite loop and running out of memory.

No idea if it is theoretically possible to end up with a layout that  
has a last page containing only a table-header and table-footer...
I can see why 0.20.5 is having trouble with that possibility, and why  
0.95 prefers the break where the last row also moves to that page.

If you really need that, then it may be possible to achieve with:
- creating a second dummy table, with the same table-header and the  
footer-content in the table-body
- omit the table-footer completely on the first table


Cheers

Andreas

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


RE: Missing table footer when report data exactly fits into a single page and "Leave out table footer at page-break" is enabled

Posted by Harshini Madurapperuma <ha...@ifs.lk>.
 Hi Andreas;

I would be really thankful for the effort you have taken to run this file. I'm really happy to know that the file gave the expected output. In order to verify, will I be able to know about the outcome. Does it give 3 full page output and a last page(fouth page) only with table header(background color pink) and footer (background color green)? This should be the expected output.

Many thanks in advance
Harshini

-----Original Message-----
From: Andreas Delmelle [mailto:andreas.delmelle@telenet.be]
Sent: Friday, October 24, 2008 1:26 AM
To: fop-users@xmlgraphics.apache.org
Subject: Re: Missing table footer when report data exactly fits into a single page and "Leave out table footer at page-break" is enabled

On Oct 23, 2008, at 13:31, Harshini Madurapperuma wrote:

> Here with I have attached the XSL-Fo file which causes the problem.
> Layout contains a table with table header and footer. And enabled
> "omit table-footer at page-break" Data fits exactly into 3 full pages
> and what will be remain after the end of third page is the table
> footer. But it doesn't print in the fourth page. It cause a out of
> memory since it keeps on going in a loop and prints "footer could not
> fit on page, moving last body row to next page"
> continuously.
>
> Can you please test this. Many Thanks in advance

FYI:
I ran your document through FOP 0.95, and there were a few issues:
- 0.95 is much less forgiving about adding the undefined 'element-id'
property you're specifying on every FO, so I had to remove these; no idea why you're adding them, but strictly speaking, the better way would be to put them in a foreign namespace
- empty table-cells and static-contents are a no-go in more recent versions (since it violates the XSL-FO spec)

Once those issues were resolved, your file ran fine, and produced the expected outcome.


HTH!

Cheers

Andreas

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org

------------------------------------------------------------------------------

CONFIDENTIALITY AND DISCLAIMER NOTICE

This e-mail, including any attachments, is confidential and intended only for
the addressee. If you are not the intended recipient, please notify us
immediately and delete this e-mail from your system. Any use or disclosure of
the information contained herein is strictly prohibited.


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: Missing table footer when report data exactly fits into a single page and "Leave out table footer at page-break" is enabled

Posted by Andreas Delmelle <an...@telenet.be>.
On Oct 23, 2008, at 13:31, Harshini Madurapperuma wrote:

> Here with I have attached the XSL-Fo file which causes the problem.  
> Layout contains a table with table header and footer. And enabled  
> "omit table-footer at page-break" Data fits exactly into 3 full  
> pages and what will be remain after the end of third page is the  
> table footer. But it doesn't print in the fourth page. It cause a  
> out of memory since it keeps on going in a loop and prints "footer  
> could not fit on page, moving last body row to next page"  
> continuously.
>
> Can you please test this. Many Thanks in advance

FYI:
I ran your document through FOP 0.95, and there were a few issues:
- 0.95 is much less forgiving about adding the undefined 'element-id'  
property you're specifying on every FO, so I had to remove these; no  
idea why you're adding them, but strictly speaking, the better way  
would be to put them in a foreign namespace
- empty table-cells and static-contents are a no-go in more recent  
versions (since it violates the XSL-FO spec)

Once those issues were resolved, your file ran fine, and produced the  
expected outcome.


HTH!

Cheers

Andreas

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


RE: Missing table footer when report data exactly fits into a single page and "Leave out table footer at page-break" is enabled

Posted by Harshini Madurapperuma <ha...@ifs.lk>.
Hi Vincent;

Here with I have attached the XSL-Fo file which causes the problem. Layout contains a table with table header and footer. And enabled "omit table-footer at page-break" Data fits exactly into 3 full pages and what will be remain after the end of third page is the table footer. But it doesn't print in the fourth page. It cause a out of memory since it keeps on going in a loop and prints "footer could not fit on page, moving last body row to next page" continuously.

Can you please test this. Many Thanks in advance
/Harshini

-----Original Message-----
From: Vincent Hennebert [mailto:vhennebert@gmail.com]
Sent: Thursday, October 23, 2008 4:40 PM
To: fop-users@xmlgraphics.apache.org
Subject: Re: Missing table footer when report data exactly fits into a single page and "Leave out table footer at page-break" is enabled

Hi Harshini,

Harshini Madurapperuma wrote:
> Hi Vincent;
>
> Thanks for your reply, I know I'm using a older version of FOP, but the problem is I just want to know whether this is a known bug in Fop? May be the latest version also having this problem.

I don't know about FOP 0.20.5, but I'm almost certain that FOP 0.95 doesn't have this problem.


> Has anyone come across with this problem? And is there a fix for this in the latest FOP version ?

You may want to download and test FOP 0.95 on your example:
http://xmlgraphics.apache.org/fop/download.html#binary
Or you can also provide us with a small but complete XSL-FO file, so that we test it for you.


Vincent


> Many Thanks in Advance
> Harshini
>
> -----Original Message-----
> From: Vincent Hennebert [mailto:vhennebert@gmail.com]
> Sent: Thursday, October 23, 2008 3:37 PM
> To: fop-users@xmlgraphics.apache.org
> Subject: Re: Missing table footer when report data exactly fits into a
> single page and "Leave out table footer at page-break" is enabled
>
> Hi Harshini,
>
> Sorry, FOP 0.20.5 is no longer supported. It's so old that hardly anyone in the dev team has the knowledge to provide support anyway. All I can say is that you should definitely upgrade to the latest version. Or lobby whoever have the decision power until they agree to upgrade. All the more than tables have been much improved in the recent versions.
>
> Vincent
>
>
> Harshini Madurapperuma wrote:
>> Hi All;
>>
>> When a table row has set a row-height and when data is exactly fit into a single page and "omit-tableFooter at page break" is enabled, the table footer doesn't print in the next page alone. The table footer gets disappeared.
>>
>> Is this a known problem in FOP? I'm having fop version 0.20.5, abit old version and can't go for a higher version at this moment.
>>
>>
>>  int status = tableFooter.layout(areaContainer);
>>  if (Status.isIncomplete(status)) {
>>                 /* this is a problem since we need to remove a row
>>                 from the last table body and place it on the
>>                 next page so that it can have a footer at
>>                 the end of the table.*/
>>
>>                if (this.omitHeaderAtBreak) {
>>                        /* remove header, no longer needed */
>>                       tableHeader = null;
>>                   }
>>                 log.warn("footer could not fit on page, moving last body row to next page");
>>                 area.addChild(areaContainer);
>>                 area.increaseHeight(areaContainer.getHeight());
>>                 tableFooter.removeLayout(areaContainer);
>>                 tableFooter.resetMarker();
>>                 return Status.AREA_FULL_SOME; }
>>
>> Many Thanks in Advance
>> Harshini

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


------------------------------------------------------------------------------

CONFIDENTIALITY AND DISCLAIMER NOTICE

This e-mail, including any attachments, is confidential and intended only for
the addressee. If you are not the intended recipient, please notify us
immediately and delete this e-mail from your system. Any use or disclosure of
the information contained herein is strictly prohibited.


Re: Missing table footer when report data exactly fits into a single page and "Leave out table footer at page-break" is enabled

Posted by Vincent Hennebert <vh...@gmail.com>.
Hi Harshini,

Harshini Madurapperuma wrote:
> Hi Vincent;
> 
> Thanks for your reply, I know I'm using a older version of FOP, but the problem is I just want to know whether this is a known bug in Fop? May be the latest version also having this problem.

I don’t know about FOP 0.20.5, but I’m almost certain that FOP 0.95
doesn’t have this problem.


> Has anyone come across with this problem? And is there a fix for this in the latest FOP version ?

You may want to download and test FOP 0.95 on your example:
http://xmlgraphics.apache.org/fop/download.html#binary
Or you can also provide us with a small but complete XSL-FO file, so
that we test it for you.


Vincent


> Many Thanks in Advance
> Harshini
> 
> -----Original Message-----
> From: Vincent Hennebert [mailto:vhennebert@gmail.com]
> Sent: Thursday, October 23, 2008 3:37 PM
> To: fop-users@xmlgraphics.apache.org
> Subject: Re: Missing table footer when report data exactly fits into a single page and "Leave out table footer at page-break" is enabled
> 
> Hi Harshini,
> 
> Sorry, FOP 0.20.5 is no longer supported. It's so old that hardly anyone in the dev team has the knowledge to provide support anyway. All I can say is that you should definitely upgrade to the latest version. Or lobby whoever have the decision power until they agree to upgrade. All the more than tables have been much improved in the recent versions.
> 
> Vincent
> 
> 
> Harshini Madurapperuma wrote:
>> Hi All;
>>
>> When a table row has set a row-height and when data is exactly fit into a single page and "omit-tableFooter at page break" is enabled, the table footer doesn't print in the next page alone. The table footer gets disappeared.
>>
>> Is this a known problem in FOP? I'm having fop version 0.20.5, abit old version and can't go for a higher version at this moment.
>>
>>
>>  int status = tableFooter.layout(areaContainer);
>>  if (Status.isIncomplete(status)) {
>>                 /* this is a problem since we need to remove a row
>>                 from the last table body and place it on the
>>                 next page so that it can have a footer at
>>                 the end of the table.*/
>>
>>                if (this.omitHeaderAtBreak) {
>>                        /* remove header, no longer needed */
>>                       tableHeader = null;
>>                   }
>>                 log.warn("footer could not fit on page, moving last body row to next page");
>>                 area.addChild(areaContainer);
>>                 area.increaseHeight(areaContainer.getHeight());
>>                 tableFooter.removeLayout(areaContainer);
>>                 tableFooter.resetMarker();
>>                 return Status.AREA_FULL_SOME; }
>>
>> Many Thanks in Advance
>> Harshini

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


RE: Missing table footer when report data exactly fits into a single page and "Leave out table footer at page-break" is enabled

Posted by Harshini Madurapperuma <ha...@ifs.lk>.
Hi Vincent;

Thanks for your reply, I know I'm using a older version of FOP, but the problem is I just want to know whether this is a known bug in Fop? May be the latest version also having this problem.

Has anyone come across with this problem? And is there a fix for this in the latest FOP version ?

Many Thanks in Advance
Harshini

-----Original Message-----
From: Vincent Hennebert [mailto:vhennebert@gmail.com]
Sent: Thursday, October 23, 2008 3:37 PM
To: fop-users@xmlgraphics.apache.org
Subject: Re: Missing table footer when report data exactly fits into a single page and "Leave out table footer at page-break" is enabled

Hi Harshini,

Sorry, FOP 0.20.5 is no longer supported. It's so old that hardly anyone in the dev team has the knowledge to provide support anyway. All I can say is that you should definitely upgrade to the latest version. Or lobby whoever have the decision power until they agree to upgrade. All the more than tables have been much improved in the recent versions.

Vincent


Harshini Madurapperuma wrote:
> Hi All;
>
> When a table row has set a row-height and when data is exactly fit into a single page and "omit-tableFooter at page break" is enabled, the table footer doesn't print in the next page alone. The table footer gets disappeared.
>
> Is this a known problem in FOP? I'm having fop version 0.20.5, abit old version and can't go for a higher version at this moment.
>
>
>  int status = tableFooter.layout(areaContainer);
>  if (Status.isIncomplete(status)) {
>                 /* this is a problem since we need to remove a row
>                 from the last table body and place it on the
>                 next page so that it can have a footer at
>                 the end of the table.*/
>
>                if (this.omitHeaderAtBreak) {
>                        /* remove header, no longer needed */
>                       tableHeader = null;
>                   }
>                 log.warn("footer could not fit on page, moving last body row to next page");
>                 area.addChild(areaContainer);
>                 area.increaseHeight(areaContainer.getHeight());
>                 tableFooter.removeLayout(areaContainer);
>                 tableFooter.resetMarker();
>                 return Status.AREA_FULL_SOME; }
>
> Many Thanks in Advance
> Harshini

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org

------------------------------------------------------------------------------

CONFIDENTIALITY AND DISCLAIMER NOTICE

This e-mail, including any attachments, is confidential and intended only for
the addressee. If you are not the intended recipient, please notify us
immediately and delete this e-mail from your system. Any use or disclosure of
the information contained herein is strictly prohibited.


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: Missing table footer when report data exactly fits into a single page and "Leave out table footer at page-break" is enabled

Posted by Vincent Hennebert <vh...@gmail.com>.
Hi Harshini,

Sorry, FOP 0.20.5 is no longer supported. It’s so old that hardly anyone
in the dev team has the knowledge to provide support anyway. All I can
say is that you should definitely upgrade to the latest version. Or
lobby whoever have the decision power until they agree to upgrade. All
the more than tables have been much improved in the recent versions.

Vincent


Harshini Madurapperuma wrote:
> Hi All;
> 
> When a table row has set a row-height and when data is exactly fit into a single page and "omit-tableFooter at page break" is enabled, the table footer doesn't print in the next page alone. The table footer gets disappeared.
> 
> Is this a known problem in FOP? I'm having fop version 0.20.5, abit old version and can't go for a higher version at this moment.
> 
> 
>  int status = tableFooter.layout(areaContainer);
>  if (Status.isIncomplete(status)) {
>                 /* this is a problem since we need to remove a row
>                 from the last table body and place it on the
>                 next page so that it can have a footer at
>                 the end of the table.*/
> 
>                if (this.omitHeaderAtBreak) {
>                        /* remove header, no longer needed */
>                       tableHeader = null;
>                   }
>                 log.warn("footer could not fit on page, moving last body row to next page");
>                 area.addChild(areaContainer);
>                 area.increaseHeight(areaContainer.getHeight());
>                 tableFooter.removeLayout(areaContainer);
>                 tableFooter.resetMarker();
>                 return Status.AREA_FULL_SOME;
> }
> 
> Many Thanks in Advance
> Harshini

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org