Hi Matthias, Sounds like a job for markers. Does the attached FO file help?
Vincent Matthias Müller wrote: > Hi there, > > i need to indicate the single pages on my output pdf in the footer area: > - if there are following pages with a "+" > - if it's the last page with a "-" > > i already posted a similar question 2 years ago and didn't receive a working > hint. back then i worked with FOP 0.20.5, so maybe something has changed > meanwhile. here is the most useful answer: > > "Is this possible? > > No, for various reasons. The most important one is that the > processing is done in two passes. > The first pass is the XSL transformation. The elements prefixed > with xsl: are instructions for the XSLT processor, which > generates an intermediate XML document consisting of elements > in the FO namespace, commonly prefixed with fo:. The FO elements > are not processed by the XSLT processor, therefore FO stuff like > page numbers are not available to the XSLT processor. In > particular there is no way to check whether something is on the > last page during XSLT processing. > The second pass is the formatting, done by formatting processors > like FOP. At this point, all xsl: elements are already gone, > there is no xsl:if available to the FO processor. > > There are some possibilities in the XSLFO standard to define > limited special processing for the last rendered page of a page > sequence, unfortunately, they are not yet implemented in FOP." > > maybe with FOP 1.0? > any hints welcome ;-)
<?xml version="1.0" standalone="no"?> <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"> <fo:layout-master-set> <fo:simple-page-master master-name="page" page-height="220pt" page-width="320pt" margin="10pt"> <fo:region-body margin-bottom="10pt"/> <fo:region-after extent="10pt"/> </fo:simple-page-master> </fo:layout-master-set> <fo:page-sequence master-reference="page"> <fo:static-content flow-name="xsl-region-after" font-size="8pt" text-align="center"> <fo:block><fo:retrieve-marker retrieve-class-name="mark" 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="mark">+</fo:marker></fo:block> <fo:block space-before="10pt">Lorem ipsum dolor sit amet, consectetur adipiscing elit. In in egestas nisi. Etiam at ante eget velit placerat ullamcorper. Suspendisse potenti. Nulla posuere turpis ac orci placerat vitae lacinia lectus tincidunt. Duis ultricies diam et lectus tempor aliquam. Mauris ligula arcu, hendrerit imperdiet ultrices laoreet, gravida sit amet metus. Donec vehicula iaculis condimentum. Sed eget tortor nec libero venenatis tincidunt.</fo:block> <fo:block space-before="10pt">Lorem ipsum dolor sit amet, consectetur adipiscing elit. In in egestas nisi. Etiam at ante eget velit placerat ullamcorper. Suspendisse potenti. Nulla posuere turpis ac orci placerat vitae lacinia lectus tincidunt. Duis ultricies diam et lectus tempor aliquam. Mauris ligula arcu, hendrerit imperdiet ultrices laoreet, gravida sit amet metus. Donec vehicula iaculis condimentum. Sed eget tortor nec libero venenatis tincidunt.</fo:block> <fo:block space-before="10pt">Lorem ipsum dolor sit amet, consectetur adipiscing elit. In in egestas nisi. Etiam at ante eget velit placerat ullamcorper. Suspendisse potenti. Nulla posuere turpis ac orci placerat vitae lacinia lectus tincidunt. Duis ultricies diam et lectus tempor aliquam. Mauris ligula arcu, hendrerit imperdiet ultrices laoreet, gravida sit amet metus. Donec vehicula iaculis condimentum. Sed eget tortor nec libero venenatis tincidunt.</fo:block> <fo:block><fo:marker marker-class-name="mark">â</fo:marker></fo:block> </fo:flow> </fo:page-sequence> </fo:root>
--------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
