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 mi...@roca.net on 2002/07/25 16:07:50 UTC

Page count & first-rest-last

Hi fop-developers-users,

I'm new to FOP and I've started with a document that needs different
footers for the first, rest and last page. Unfortunatly, as reported in the
bug database, fop do not apply the page-master for the last page, only
first and rest work properly.

Any work-arround?

Second, I'd like to know the total number of pages, to print 'page n of N'
Have you any trick for this?

Thanks in advance.

Miquel Sas


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
For additional commands, email: fop-dev-help@xml.apache.org


Re: Page count & first-rest-last

Posted by "J.Pietschmann" <j3...@yahoo.de>.
miguel_sas@roca.net wrote:
> I'm new to FOP and I've started with a document that needs different
> footers for the first, rest and last page. Unfortunatly, as reported in the
> bug database, fop do not apply the page-master for the last page, only
> first and rest work properly.

It depends on what is different on the last page from
the rest.
Another possibility is a two pass approach:
Define the following page master:
   <fo:page-sequence-master master-name="master">
      <fo:single-page-master-reference master-reference="title"/>
      <fo:repeatable-page-master-reference master-reference="other"
           maximum-repeats="1000"/>
      <fo:single-page-master-reference master-reference="last"/>
   </fo:page-sequence-master master-name="master">

Get the page count and insert pageCount-2 for the 1000.
If you generate the FO with XSLT You can automate this with
a small Java wrapper, take
  http://marc.theaimsgroup.com/?l=fop-user&m=102002702026609&w=2
and replace the "page-count" XSLT parameter with an appropriately
used "maximum-repeats" parameter.

> Second, I'd like to know the total number of pages, to print 'page n of N'
> Have you any trick for this?

FAQ. See
  http://marc.theaimsgroup.com/?l=fop-user&m=102052610605212&w=2

J.Pietschmann


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
For additional commands, email: fop-dev-help@xml.apache.org