[ATT. Chris]

Hi Chris and thank you very much for your efforts in helping me out.
However, I started trying just to get the background color to be applied across 
all regions, and I have not succeeded.

Please tell me what I am doing wrong with this simple document.
Only the region-body region gets blue background color.

<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format";>
  <fo:layout-master-set>
    <fo:simple-page-master master-name="master0" page-width="1191px" 
page-height="842px" margin-left="0px" margin-right="0px" margin-top="0px" 
margin-bottom="0px">
      <fo:region-body margin-left="638px" margin-right="100px" 
margin-top="32px" margin-bottom="100px" background-color="blue" />
      <fo:region-before background-color="blue" />
      <fo:region-after background-color="blue" />
    </fo:simple-page-master>
  </fo:layout-master-set>
  <fo:page-sequence master-reference="master0">
    <fo:static-content flow-name="xsl-region-before">
      <fo:block-container position="absolute" left="20px" top="20px" 
width="300px" height="20px">
        <fo:block>I hoped this area would be blue as well.</fo:block>
      </fo:block-container>
    </fo:static-content>
    <fo:flow flow-name="xsl-region-body"><fo:block /></fo:flow>
  </fo:page-sequence>
</fo:root>


Regards,
Dennis JD Myrén
Developer
Oslo Kodebureau
Tel:      (+47) 98 00 11 92
Mail:   [EMAIL PROTECTED]
Web:   www.oslokb.no
-----Original Message-----
From: Chris Bowditch [mailto:[EMAIL PROTECTED] 
Sent: 7. januar 2005 15:02
To: [EMAIL PROTECTED]
Subject: Re: Page background color

Dennis Myrén wrote:

<snip/>

> Is there a way to set the background color of the entire page, 
> regardless of whether objects are placed

No, you cant set background color on the entire page. But you can set it on 
region-*. So in your case, as well as setting background color on region-body 
you will need to set it on region-before too.

<snip/>

> I would like not to repeat that static content, but rather have it 
> rendered only at the first page.

This is straigt forward to achieve. You will need to create two 
fo:simple-page-master objects, one with a region-before defined and the other 
without. Then create a fo:page-sequence-master which uses defines which 
simple-page-master is used based on page-position. The fo:page-sequence then 
references the page-sequence-master. E.g.

<fo:simple-page-master master-name="first" page-width="210mm" 
page-height="297mm">
<fo:region-body margin-top="20mm" background-color="blue"/>
<fo:region-before region-name="firstHeader" extent="20mm" 
background-color="blue"/>
</fo:simple-page-master>

<fo:simple-page-master master-name="rest" page-width="210mm" 
page-height="297mm">
<fo:region-body margin-top="20mm" background-color="blue"/>
<fo:region-before region-name="restHeader" extent="20mm" 
background-color="blue"/>
</fo:simple-page-master>

<fo:page-sequence-master name="all">
<fo:repeatable-page-master-alternatives>
<fo:conditional-page-master-reference master-reference="first" 
page-position="first"/>
<fo:conditional-page-master-reference master-reference="rest" 
page-position="rest"/>
</fo:repeatable-page-master-alternatives>
</fo:page-sequence-master>

then the page-sequence element references the page-sequence-master, e.g.

<fo:page-sequence master-reference="all">
<fo:static-content flow-name="firstHeader">
<fo:block>This will only appear on page 1</fo:block>
</fo:static-content>
<fo:flow>
<!-- your table as usual -->
</fo:flow>
</fo:page-sequence>

HTH!

Chris


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to