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 "PATEL, DINESH (ISD)" <PA...@britannic.co.uk> on 2002/05/14 10:32:43 UTC
page-masters for different 1st page
I now have a requirement for a document to have different content in the
region-after for the first page.
I've thought about using different <fo:simple-page-master> elements for this
and also using something like:
<fo:page-sequence-master master-name="seq" >
<fo:repeatable-page-master-alternatives>
<fo:conditional-page-master-reference master-name="first"
page-position="first" />
<fo:conditional-page-master-reference master-name="rest"
page-position="rest" />
</fo:repeatable-page-master-alternatives>
</fo:page-sequence-master>
RE: page-masters for different 1st page
Posted by joseph berdat <jo...@dst.ca>.
You are nearly there... You can name your region-after within the two
simple-page-masters differently and assign different content to them.
<fo:layout-master-set>
<fo:simple-page-master page-height="297mm" page-width="210mm"
margin-top="40mm" margin-bottom="10mm"
margin-left="25mm" margin-right="25mm"
master-name="PageMasterOneOne">
<fo:region-body margin-top="40mm" margin-bottom="45mm"/>
<fo:region-after extent="40mm" display-align="after"
region-name="footerTOC1"/>
</fo:simple-page-master>
<fo:simple-page-master page-height="297mm" page-width="210mm"
margin-top="25mm" margin-bottom="10mm"
margin-left="25mm" margin-right="25mm"
master-name="PageMasterOneTwo">
<fo:region-body margin-top="30mm" margin-bottom="25mm"/>
<fo:region-after extent="20mm" display-align="after"
region-name="footerTOC2"/>
</fo:simple-page-master>
<fo:page-sequence-master master-name="PageMasterOne">
<fo:repeatable-page-master-alternatives>
<fo:conditional-page-master-reference
master-reference="PageMasterOneOne"
page-position="first"/>
<fo:conditional-page-master-reference
master-reference="PageMasterOneTwo"
page-position="rest"/>
</fo:repeatable-page-master-alternatives>
</fo:page-sequence-master>
<fo:layout-master-set>
<fo:page-sequence master-reference="PageMasterOne">
<!-- Static content for page 1 -->
<fo:static-content flow-name="footerTOC1">
<fo:block>Content of footer for first page.</fo:block>
</fo:static-content>
<fo:static-content flow-name="footerTOC2">
<fo:block>Content of footer for all other pages.</fo:block>
</fo:static-content>
<!-- Content for page sequence. -->
<fo:flow flow-name="xsl-region-body">
<fo:block>Content of the page sequence.</fo:block>
</fo:flow>
</fo:page-sequence>
Re: page-masters for different 1st page
Posted by Ralf Steppacher <st...@esteam.de>.
>>From what I can gleam from the examples all this allows me to do is have
> different margins for the first page. My first page needs to have different
> content in the region-after only for the first page.
>
> Is there a way of doing this?
You are nearly there... You can name your region-after within the two
simple-page-masters differently and assign different content to them.
<fo:layout-master-set>
<fo:simple-page-master page-height="297mm" page-width="210mm"
margin-top="40mm" margin-bottom="10mm"
margin-left="25mm" margin-right="25mm"
master-name="PageMasterOneOne">
<fo:region-body margin-top="40mm" margin-bottom="45mm"/>
<fo:region-after extent="40mm" display-align="after"
region-name="footerTOC1"/>
</fo:simple-page-master>
<fo:simple-page-master page-height="297mm" page-width="210mm"
margin-top="25mm" margin-bottom="10mm"
margin-left="25mm" margin-right="25mm"
master-name="PageMasterOneTwo">
<fo:region-body margin-top="30mm" margin-bottom="25mm"/>
<fo:region-after extent="20mm" display-align="after"
region-name="footerTOC2"/>
</fo:simple-page-master>
<fo:page-sequence-master master-name="PageMasterOne">
<fo:repeatable-page-master-alternatives>
<fo:conditional-page-master-reference
master-reference="PageMasterOneOne"
page-position="first"/>
<fo:conditional-page-master-reference
master-reference="PageMasterOneTwo"
page-position="rest"/>
</fo:repeatable-page-master-alternatives>
</fo:page-sequence-master>
<fo:layout-master-set>
<fo:page-sequence master-reference="PageMasterOne">
<!-- Static content for page 1 -->
<fo:static-content flow-name="footerTOC1">
<fo:block>Content of footer for first page.</fo:block>
</fo:static-content>
<fo:static-content flow-name="footerTOC2">
<fo:block>Content of footer for all other pages.</fo:block>
</fo:static-content>
<!-- Content for page sequence. -->
<fo:flow flow-name="xsl-region-body">
<fo:block>Content of the page sequence.</fo:block>
</fo:flow>
</fo:page-sequence>
HTH
Ralf
Re: page-masters for different 1st page
Posted by Jeremias Maerki <je...@outline.ch>.
You're almost there. All you have to do now is apply a non-default
region-name to the region-after of one of the simple-page-masters. Then
you create a new fo:static-content and set the flow-name to this other
name. Example (uninteresting stuff is left out):
<fo:simple-page-master master-name="first">
<fo:region-body />
<fo:region-after region-name="first-region-after"/>
</fo:simple-page-master>
<fo:simple-page-master master-name="rest">
<fo:region-body/>
<fo:region-after/>
</fo:simple-page-master>
[..]
<fo:static-content flow-name="first-region-after"/>
[..]
<fo:static-content flow-name="xsl-region-after"/>
> I now have a requirement for a document to have different content in the
> region-after for the first page.
> I've thought about using different <fo:simple-page-master> elements for this
> and also using something like:
>
> <fo:page-sequence-master master-name="seq" >
> <fo:repeatable-page-master-alternatives>
> <fo:conditional-page-master-reference master-name="first"
> page-position="first" />
> <fo:conditional-page-master-reference master-name="rest"
> page-position="rest" />
> </fo:repeatable-page-master-alternatives>
> </fo:page-sequence-master>
>
> From what I can gleam from the examples all this allows me to do is have
> different margins for the first page. My first page needs to have different
> content in the region-after only for the first page.
>
> Is there a way of doing this?
Cheers,
Jeremias Märki
mailto:jeremias.maerki@outline.ch
OUTLINE AG
Postfach 3954 - Rhynauerstr. 15 - CH-6002 Luzern
Tel. +41 41 317 2020 - Fax +41 41 317 2029
Internet http://www.outline.ch