xmlgraphics-fop-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andreas Delmelle <andreas.delme...@telenet.be>
Subject Re: Continue page break
Date Thu, 14 Feb 2008 21:21:34 GMT
On Feb 14, 2008, at 21:43, Cristian Ferrero wrote:

> Hi, that was the first question...the second was about footer only   
> in first page (when there is one) or in the last (where are more  
> than one) using marks...
>
> im trying to doing this in

I just tested myself, and the below code seems to do what you're  
looking for (with FOP Trunk)

The first page-sequence consists of only one page.
The last-ending "continued" marker in the page, looking backward into  
the whole page-sequence, is the one containing the empty fo:inline,  
so we only get the "total" footer.

The second page-sequence demonstrates what happens when you have  
multiple pages.
The last-ending "continued" marker in the page will always be the  
first one in the document for all pages but the one where that last  
block ends up.

Note that the fo:retrieve-marker has to be contained in a fo:block,  
otherwise it has no effect. Or at least, so I discovered just now...  
Not sure if this is compliant, so we might have to look into that.


Cheers

Andreas

---
<?xml version="1.0" encoding="UTF-8"?>
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
   <fo:layout-master-set>
     <fo:simple-page-master master-name="page" page-height="5in" page- 
width="6in" margin-top=".5in" margin-bottom=".5in" margin-left=".9in"  
margin-right=".9in">
       <fo:region-body margin-bottom=".5in" margin-top="2.5in" />
       <fo:region-before region-name="header" extent="2.5in" />
       <fo:region-after region-name="footer" extent=".5in" />
     </fo:simple-page-master>
   </fo:layout-master-set>
   <fo:page-sequence master-reference="page">
     <fo:static-content flow-name="footer">
       <fo:block>
         <fo:retrieve-marker retrieve-class-name="continued" retrieve- 
boundary="page-sequence" retrieve-position="last-ending-within-page"/>
         <fo:retrieve-marker retrieve-class-name="total" retrieve- 
boundary="page" retrieve-position="last-ending-within-page"/>
       </fo:block>
     </fo:static-content>
     <fo:flow flow-name="xsl-region-body">
       <fo:block>
         <fo:marker marker-class-name="continued">Continued</fo:marker>
         <fo:marker marker-class-name="total" />
         Some text
       </fo:block>
       <fo:block>Some text</fo:block>
       <fo:block>
         <fo:marker marker-class-name="continued"><fo:inline /></ 
fo:marker>
         <fo:marker marker-class-name="total">Total</fo:marker>
         final block
       </fo:block>
     </fo:flow>
   </fo:page-sequence>
   <fo:page-sequence master-reference="page">
     <fo:static-content flow-name="footer">
       <fo:block>
         <fo:retrieve-marker retrieve-class-name="continued" retrieve- 
boundary="document" retrieve-position="last-ending-within-page"/>
         <fo:retrieve-marker retrieve-class-name="total" retrieve- 
boundary="page" retrieve-position="last-ending-within-page"/>
       </fo:block>
     </fo:static-content>
     <fo:flow flow-name="xsl-region-body">
       <fo:block>
         <fo:marker marker-class-name="continued">Continued</fo:marker>
         <fo:marker marker-class-name="total" />
         Some text
       </fo:block>
       <fo:block>Some text</fo:block>
       <fo:block break-before="page">Some more text</fo:block>
       <fo:block break-before="page">and the last page</fo:block>
       <fo:block>
         <fo:marker marker-class-name="continued"><fo:block /></ 
fo:marker>
         <fo:marker marker-class-name="total">Total</fo:marker>
         final block
       </fo:block>
     </fo:flow>
   </fo:page-sequence>
</fo:root>
---


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


Mime
View raw message