You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-dev@xmlgraphics.apache.org by Carlos Villegas <ca...@uniscope.jp> on 2015/07/13 09:23:47 UTC

blank pages and conditional-page-master-reference page-position=last

When a blank page is generated because the page-sequence specified 
force-page-count, does this page also match the page-position=last 
condition?
It seems in some old versions of FOP (1.0?) this was not the case, 
page-position=last didn't match the padding pages.
We were actually counting on that behavior using 
conditional-page-master-reference, but it seems the current version 
doesn't work that way anymore.
Actually we were getting some unreliable output, when the last page 
(before the blank page) is full, it didn't match page-position=last, but 
when there was some space left it was matching. I was going to report 
that as a bug, but then I tested versions 1.1 and 2.0 and they work 
differently.
It seems that in the current version of FOP a generated blank page also 
matches page-position=last.
We were trying to generate a "End of Section" message on the footer of 
the last page with content using a special master matching 
page-position=last.
But this doesn't work if the last page is a generated blank page, which 
matches a different master in our case.

So, what's the correct  behavior: is a generated blank page at end of 
page sequence also the last page?
If that's the case, then there's no condition that matches the last page 
with content, is this right?

Thanks,
Carlos



Re: blank pages and conditional-page-master-reference page-position=last

Posted by Matthias Reischenbacher <ma...@gmx.at>.
Hi Carlos,

that's funny, the exact same problem was reported by one of my clients 
today, so I had a closer look and created 
https://issues.apache.org/jira/browse/FOP-2498

It seems that this was caused by the changes for 
https://issues.apache.org/jira/browse/FOP-1976
I'll commit a fix a bit later.

BR,
Matthias

On 13.07.2015 04:23, Carlos Villegas wrote:
> When a blank page is generated because the page-sequence specified 
> force-page-count, does this page also match the page-position=last 
> condition?
> It seems in some old versions of FOP (1.0?) this was not the case, 
> page-position=last didn't match the padding pages.
> We were actually counting on that behavior using 
> conditional-page-master-reference, but it seems the current version 
> doesn't work that way anymore.
> Actually we were getting some unreliable output, when the last page 
> (before the blank page) is full, it didn't match page-position=last, 
> but when there was some space left it was matching. I was going to 
> report that as a bug, but then I tested versions 1.1 and 2.0 and they 
> work differently.
> It seems that in the current version of FOP a generated blank page 
> also matches page-position=last.
> We were trying to generate a "End of Section" message on the footer of 
> the last page with content using a special master matching 
> page-position=last.
> But this doesn't work if the last page is a generated blank page, 
> which matches a different master in our case.
>
> So, what's the correct  behavior: is a generated blank page at end of 
> page sequence also the last page?
> If that's the case, then there's no condition that matches the last 
> page with content, is this right?
>
> Thanks,
> Carlos
>
>